<template>
	<div>
		<header>
			<span @click="backClick"><返回</span>
			<span>当前位置:&nbsp;业务总览&nbsp;>&nbsp;{{type}}</span>
		</header>
		<div class="detail_container" :style="{height: heightClient}" v-if="a">
			<div class="side_choose" >
				<div class="choose_bar" v-show="type !== '扣罚情况' && type !== '耗材使用情况'">
					<div v-show="type === '住院情况'" class="zhuyan-tittle">编制床位数：{{bedAmount}}</div>
					<div v-show="type !== '住院情况'" class="zhuyan-tittle">{{type}}</div>
					<div class="bar" @click="barClick('out')" @mouseenter = "barMouseEnter('out')" @mouseleave = "barMouseLeave('out')"
						:class="[
						{active: outShow && type === '门急诊情况'},
						{active1: outShow && type === '住院情况'},
						{active2: outShow && type === '手术情况'},
						{active3: outShow && type === '药品使用情况'},
						{active4: outShow && type === '耗材使用情况'},
						{active5: outShow && type === '扣罚情况'},
						]">
						<div class="bar-title">{{menBarTitle1}}
							<span v-show="type !== '耗材使用情况'">(本月)</span>
						</div>
						<div style="font-size: 15px;">
							<span>{{medicalPeoThisMonth}}&nbsp;{{firstUnit}}</span><br>
						</div>
							<span v-show="type !== '耗材使用情况'">同期:</span>
							<span>{{medicalPeoSamePeriod}}&nbsp;{{firstUnit}}</span><br>
					</div>
					<div class="bar" @click="barClick('average')" @mouseenter = "barMouseEnter('average')" @mouseleave = "barMouseLeave('average')"
					:class="[
						{active: averageShow && type === '门急诊情况'},
						{active1: averageShow && type === '住院情况'},
						{active2: averageShow && type === '手术情况'},
						{active3: averageShow && type === '药品使用情况'},
						{active4: averageShow && type === '耗材使用情况'},
						{active5: averageShow && type === '扣罚情况'},
						]">	
						<div class="bar-title">{{menBarTitle2}}
							<span v-show="type !== '耗材使用情况'">(本月)</span>
						</div>
						<div style="font-size: 15px;">
							<span>{{outpatientPeoThisMonth}}&nbsp;{{secondUnit}}</span><br>
							
						</div>
						<span v-show="type !== '耗材使用情况'">同期:</span>
						<span>{{outpatientSamePeriod}}&nbsp;{{secondUnit}}</span><br>	
					</div>
					<div class="bar" @click="barClick('use')" @mouseenter = "barMouseEnter('use')" @mouseleave = "barMouseLeave('use')" :class="[
						{active: useShow && type === '门急诊情况'},
						{active1: useShow && type === '住院情况'},
						{active2: useShow && type === '手术情况'},
						{active3: useShow && type === '药品使用情况'},
						{active4: useShow && type === '耗材使用情况'},
						{active5: useShow && type === '扣罚情况'},
						]">
						<div class="bar-title">{{menBarTitle3}}
							<span v-show="type !== '耗材使用情况'">(本月)</span>
						</div>
						<div style="font-size: 15px;">
							<span>{{emergencyPeoThisMonth}}&nbsp;{{thirdUnit}}</span><br>
							
						</div>
						<span v-show="type !== '耗材使用情况'">同期:</span>
							<span>{{emergencyPeoSamePeriod}}&nbsp;{{thirdUnit}}</span><br>
							
					</div>
				</div>
				<div class="choose_bar" v-show="type === '扣罚情况'">
					<div class="zhuyan-tittle">{{type}}</div>
					<div class="bar_s" @click="barClick('out')" @mouseenter = "barMouseEnter('out')"  @mouseleave = "barMouseLeave('out')" :class="{active5: outShow}">
						<div class="bar-title">
							扣罚总额(本月)
						</div>
						<div class="bar_font">{{penTotal}}&nbsp;元</div>
					</div>
					<div class="bar_s" @click="barClick('average')"   @mouseleave = "barMouseLeave('average')" @mouseenter="barMouseEnter('average')" :class="{active5: averageShow}">
						<div class="bar-title">
							安全部扣罚(本月)
						</div>
						<div class="bar_font">{{safePen}}&nbsp;元</div>
					</div>
					<div class="bar_s" @click="barClick('use')"  @mouseenter="barMouseEnter('use')"   @mouseleave = "barMouseLeave('use')" :class="{active5: useShow}">
						<div class="bar-title">
							医保拒付(本月)
						</div>
						<div class="bar_font">{{refusePay}}&nbsp;元</div>
					</div>
					<div class="bar_s" @click="barClick('other')"   @mouseleave = "barMouseLeave('other')" @mouseenter="barMouseEnter('other')" :class="{active5: otherShow}">
						<div class="bar-title">
							其他扣罚(本月)
						</div>
						<div class="bar_font">{{otherPay}}&nbsp;元</div>
					</div>
				</div>
				<div class="choose_bar" v-show="type === '耗材使用情况'">
					<div class="zhuyan-tittle">{{type}}</div>
					<div class="bar" @click="barClick('out')"  @mouseleave = "barMouseLeave('out')" @mouseenter="barMouseEnter('out')"
					:class="[
					{active4: outShow && type === '耗材使用情况'}
					]">
						<div class="bar-title">{{menBarTitle1}}</div>
						<div style="font-size: 15px;">
							<span>{{medicalPeoThisMonth}}&nbsp;元</span>
						</div>
						<span>占比：</span>
							<span>{{medicalPeoSamePeriod}}</span>		
					</div>
					<div class="bar" @click="barClick('average')" @mouseleave = "barMouseLeave('average')" @mouseenter="barMouseEnter('average')" :class="[
					{active4: averageShow && type === '耗材使用情况'}
					]">	
						<div class="bar-title">{{menBarTitle2}}</div>
						<div style="font-size: 15px;">
							<span>{{outpatientPeoThisMonth}}&nbsp;元</span>
						</div>
						<span>占比：</span>
							<span>{{outpatientSamePeriod}}</span><br>
					</div>
					<div class="bar" @click="barClick('use')" @mouseleave = "barMouseLeave('use')" @mouseenter="barMouseEnter('use')" :class="[
					{active4: useShow && type === '耗材使用情况'},
					]">
						<div class="bar-title">{{menBarTitle3}}</div>
						<div style="font-size: 15px;">
							<span>{{emergencyPeoThisMonth}}&nbsp;元</span><br>
						</div>
							<span>占比：</span>
							<span>{{emergencyPeoSamePeriod}}</span><br>
					</div>
				</div>
				<div style="overflow-y: auto;height: calc(100% - 200px); width: calc(100% - 20px);margin: 0 auto;">
					<!-- <div style="width: 100%; height: 500%; background: #eee"></div> -->
					<div ref="list" style="width: 100%;":style="{height: listHeight}"></div>
				</div>
			</div>
			<div class="container_right" v-show="type === '门急诊情况'">
				<div class="right_top">
					<div class="right_title">{{menrighttop_title}}</div>
					<div ref="menrighttop" style="height: 90%; width: 100%;"></div>
				</div>
				<div class="right_bottom">
					<div class="bottom-left right" style="height: 100%;">
						<div class="right_title">
							急诊指标&nbsp;&nbsp;
							<span class="smtitle">(院级指标，不与科室联动)</span>
						</div>
						<div class="right_content">
							<ul>
								<li>输液（人次）：
									<span>{{emeInfusionPeo}}</span>
								</li>
								<li>抢救（人次）：
									<span>{{emeRescuePeo}}</span>
								</li>
								<li>留观（人天）：
									<span>{{emeLeftPeo}}</span>
								</li>
							</ul>
						</div>
					</div>
					<div class="bottom-right" style="height: 100%;">
						<div class="right_title">
							卒中中心指标&nbsp;&nbsp;
							<span class="smtitle">(院级指标，不与科室联动)</span>
						</div>
						<div class="right_content">
							<ul>
								<li>输液（人次）：
									<span>{{cuInfusionPeo}}</span>
								</li>
								<li>抢救（人次）：
									<span>{{cuSavePeo}}</span>
								</li>
								<li>留观（人天）：
									<span>{{cuLeftPeo}}</span>
								</li>
							</ul>
						</div>
					</div>
				</div>
			</div>
			<div class="container_right" v-show="type === '住院情况'">
				<div class="bottom-right right" style="height: 45%;">
						<div class="right_title">出入院动态</div>
						<ul class="right_nav"  style="margin-top: 20px;">
							<li>
								<span>{{endMonPeo}}</span><br>
								<span>上期末人数</span>
							</li>
							<li>
								<span>{{endLeftPeo}}</span><br>
								<span>期末留院人数</span>
							</li>
							<li>
								<span>{{inPeo}}</span><br>
								<span>入院人数</span>
							</li>
							<li>
								<span>{{outPeo}}</span><br>
								<span>出院人数</span>
							</li>
							<li>
								<span>{{intoPeo}}</span><br>
								<span>他科转入</span>
							</li>
							<li>
								<span>{{tranOutPeo}}</span><br>
								<span>转入他科</span>
							</li>
						</ul>
						<!-- <ul class="right_nav">
							
						</ul>
						<ul class="right_nav">
							
						</ul> -->
				</div>
				<div class="bottom-right" style="height: 45%;">
						<div class="right_title">出院人数</div>
						<ul class="right_nav"  style="margin-top: 20px;">
							<li>
								<span>{{outSickPeo}}</span><br>
								<span>出院病人数</span>
							</li>
							<li>
								<span>{{outInBaby}}</span><br>
								<span>新生儿</span>
							</li>
						</ul>
						<div ref="zhuchu" style="height:calc( 80% - 90px); width: 100%;"></div>
				</div>
				<div class="bottom-right right" style="background:#f8f8f8;margin-top: 20px;">
					<div class="right-small">
						<div class="right_title">总床日数</div>
						<div class="right_all">
							<ul>
								<li>
									<span>{{bedFact}}</span><br>
									<span>实际开放</span>
								</li>
								<li>
									<span>{{bedOcc}}</span><br>
									<span>实际占用</span>
								</li>
								<li>
									<span>{{bedOut}} </span><br>
									<span>出院者占用</span>
								</li>
							</ul>
						</div>
					</div>
					<div class="right-big">
							<div class="right_title">病床使用</div>
							<ul class="bingchuang">
								<li>
									<span>{{bedTranTimes}}</span><br>
									<span>平均病床周转次数</span>
									
								</li>
								<li>
									<span>{{bedWorkDay}}</span><br>
									<span>平均病床工作日</span>
									
								</li>
							</ul>
					</div>
				</div>
				<div class="bottom-right" style="height: 50%; margin-top: 20px">
						<div class="right_title">住院来源</div>
						<!-- <ul class="right_nav"  style="margin-top: 20px;">
							<li>
								<span>{{hosEmePeo}}</span><br>
								<span>急诊住院</span>
							</li>
							<li>
								<span>{{hosNorPeo}}</span><br>
								<span>普通住院</span>
							</li>
						</ul> -->
						<div ref="zhuzhen" style="height: calc(100% - 50px); width: 100%;"></div>
				</div>
			</div>
			<div class="container_right" v-show="type === '药品使用情况'">
				<div class="right_top">
					<div class="right_title">{{medicinetop_title}}</div>
					<div ref="medicinetop" style="height: 90%; width: 100%;"></div>
				</div>
				<div class="bottom-right right" style="width: 30%;">
					<div class="right_title" style="margin-bottom: 10%">用药占比</div>
					<div ref="menrightbottom" style="height: 60%; width: 100%;"></div>
				</div>
				<div class="bottom-right" style="width: 68%;">
						<div class="right_title">药品种占比</div>
						<div ref="yaopinzhong" style="height: calc(100% - 50px); width: 100%;"></div>
				</div>
			</div>
			<div class="container_right" v-show="type === '手术情况'">
				<div class="right_top">
					<div class="right_title">{{shoushutop_title}}</div>
					<div ref="shoushutop" style="height: 90%; width: 100%;"></div>
				</div>
				
				<!-- <div class="bottom-right right" v-show="!menzhenshoushushow">
					<div class="right_title">
						手术特征
						<span class="smtitle">（院级指标，不与科室联动）</span>
					</div>
					<div ref="menzhenshoushutezheng" style="height: 85%; width: 100%;"></div>
				</div> -->
				<div class="bottom-right right">
					<div class="right_title">
						手术特征
						<span class="smtitle">（院级指标，不与科室联动）</span>
					</div>
					<div ref="menzhenshoushutezheng" style="height: 85%; width: 100%;"></div>
				</div>
				<div class="bottom-right">
					<div class="right_title">住院手术类型</div>
					<div ref="menzhenshoushuleixing" style="height: 85%; width: 100%;"></div>
				</div>				
			</div>
			<div class="container_right" v-show="type === '耗材使用情况'">
				<div class="right_top">
					<div class="right_title">{{haocaitop_title}}</div>
					<div ref="haocaitop" style="height: calc(100% - 50px); width: 100%;"></div>
				</div>
				<div class="bottom-right right">
						<div class="right_title">耗材开销分类</div>
						<div ref="haocaimenji" style="height: calc(100% - 50px); width: 100%;"></div>
				</div>
				<div class="bottom-right">
						<div class="right_title">耗材用途分类</div>
						<div ref="haocaileibie" style="height: calc(100% - 50px); width: 100%;"></div>
				</div>
			</div>
			<div class="container_right" v-show="type === '扣罚情况'">
				<div class="right_top">
					<div class="right_title">{{koufazongequshi_title}}</div>
					<div ref="koufazongequshi" style="height: calc(100% - 50px); width: 100%;"></div>
				</div>
				<div class="koufa koutwo right">
						<div class="right_title">安全部扣罚</div>
						<div ref="anquanbukoufa" style="height: calc(100% - 50px); width: 100%;"></div>
				</div>
				<div class="koufa right">
						<div class="right_title">医保拒付扣罚</div>
						<div ref="jufukoufa" style="height: calc(100% - 50px); width: 100%;"></div>
				</div>
				<div class="koufa koutwo">
						<div class="right_title">其他扣罚</div>
						<div ref="qitakoufa" style="height: calc(100% - 50px); width: 100%;"></div>
				</div>
			</div>
		</div>
	</div>
</template>
<script>
import echarts from 'echarts'
import axios from 'axios'
export default {
	data () {
		return {
			type: this.$route.params.type,
			heightClient: '0px',
			typeValue: '',
			otherShow: false,
			menzhenshoushushow: true,
			outHover: false,
			averageHover: false,
			useHover: false,
			otherHover: false,
			listHeight: '0px',
			firstUnit: '',
			secondUnit: '',
			thirdUnit: '',
			//门急诊情况
			cuInfusionPeo: "", //卒中输液人次
		    cuLeftPeo: "", //卒中留观人次
		    cuSavePeo: "", //卒中抢救人次
		    emeInfusionPeo: "", //急诊输液人次
		    emeLeftPeo: "", //急诊留观人次
		    emeRescuePeo: "", //急诊抢救人次
		    emergencyPeoThisMonth: "", //本月急诊人次
		    medicalPeoThisMonth: "", //本月诊疗人次
		    outpatientPeoThisMonth: "", //本月门诊人次
		    emergencyPeoSamePeriod: "", //同期急诊人次
		    medicalPeoSamePeriod: "", //同期诊疗人次
		    outpatientSamePeriod: "", //同期门诊人次
		    //住院情况
		    aveHosDayThisMonth: "", //平均住院日本月
		    outTotalPeoThisMonth: "", //出院总人数本月
		    bedRateThisMonth: "", //病床使用率本月
		    aveHosDaySamePeriod: "", //平均住院日同期
		    outTotalPeoSamePeriod: "", //出院总人数同期
		    bedRateSamePeriod: "", //病床使用率同期
		    bedAmount:"", //
			bedFact: "", //实际开放数
			bedOcc: "", //实际占用数
			bedOut: "", //出院者占用数	
			bedTranTimes: "", //平均病床周转次数
			bedWorkDay: "", //平均病床工作日
			endLeftPeo: "", //期末留院人数
			endMonPeo: "", //上期末人数
			hosEmePeo: "", //急诊住院人数
			hosNorPeo: "", //普通住院人数
			inPeo: "", //入院人数
			intoPeo: "", //他科转入人数
			outInBaby: "", //新生儿
			outInBegood: "", //好转人数
			outInCure: "", //治愈人数
			outInDie: "", //死亡人数
			outInNocure: "", //未愈人数
			outPeo: "", //出院人数
			outSickPeo: "", //出院病人数
			tranOutPeo: '',//转入他科
			//用药
			medRate: "", //用药占比
			monthTime: "", //（评估时间）
			medWestIncome: "", //西药总额
			medDrinkIncome: "", //中药饮片总额
			medMidIncome: "", //中成药总额
			//耗材
			conTimeNum : '', //计费耗材总额
			conNotimeNum : '',//非计费耗材总额
			conNurNum: "", //护理相关耗材总额
			conDocNum: "", //医生相关耗材总额
			//扣罚
			safeEmePay: "", //扣科室绩效
			safeHosPay: "", //扣个人绩效
			refuseChePay: "", //检查治疗费
			refuseMatPay: "", //材料费
			refuseMedPay: "", //药品费
			otherExpPay: "", //专家诊迟诊费
			otherNormalPay: "", //普通诊迟诊费
			otherPay: "", //其他扣罚总额
			penTotal: "", //扣罚总额
			refusePay: "", //医保拒付扣罚总额
			safePen: "", //医疗安全扣罚总额
			menrighttop_title: "诊疗人次",
			shoushutop_title: "手术量趋势",
			medicinetop_title: "用药总额",
			haocaitop_title: "耗材总额",
			koufazongequshi_title: "扣罚总额",
			a: true,
			menBarTitle1: '',
			fontover: false,
			menBarTitle2: '',
			menBarTitle3: '',
			outShow: true,
			a: true,
			averageShow: false,
			useShow: false,
			listH: '0px',
			options_depIds: [],
			options: {
				tooltip: {
					show: true,
					trigger: 'axis',
					// triggerOn: 'click',
					// formatter: function(params,ticket,callback) {
					// 	callback()
					// }
				},
			    legend: {
			        data: ['本月', '同期'],
			        itemWidth: 28,
			        itemHeight: 10
			    },
			    grid: {
			        left: '3%',
			        right: '14%',
			        bottom: '3%',
			        top: '40px',
			        containLabel: true
			    },
			    xAxis: [{
			        type: 'value',
			        axisPointer: {
			            show: false
			        },
			        // boundaryGap: [0, 0.01],
			        show: false
			    },{
			        type: 'value',
			        data: [],
			        show: false
			    }],
			    yAxis: [{
			        type: 'category',
			        data: [],
			        nameGap: '100',
			        boundaryGap: true,
			        axisLine: {
			        	show: false
			        },
			        // triggerEvent: true, 
			        axisTick: {
			        	show: false,
			        	length: 100
			        },
			        axisLabel: {
			        	interval: 0,
			        	formatter:function(params){
				        	var newParamsName = "";// 最终拼接成的字符串
							    var paramsNameNumber = params.length;// 实际标签的个数
							    var provideNumber =8;// 每行能显示的字的个数
							    var rowNumber = Math.ceil(paramsNameNumber / provideNumber);// 换行的话，需要显示几行，向上取整
							    /**
							     * 判断标签的个数是否大于规定的个数， 如果大于，则进行换行处理 如果不大于，即等于或小于，就返回原标签
							     */
							    // 条件等同于rowNumber>1
							    if (paramsNameNumber > provideNumber) {
							        /** 循环每一行,p表示行 */
							        for (var p = 0; p < rowNumber; p++) {
							            var tempStr = "";// 表示每一次截取的字符串
							            var start = p * provideNumber;// 开始截取的位置
							            var end = start + provideNumber;// 结束截取的位置
							            // 此处特殊处理最后一行的索引值
							            if (p == rowNumber - 1) {
							                // 最后一次不换行
							                tempStr = params.substring(start, paramsNameNumber);
							            } else {
							                // 每一次拼接字符串并换行
							                tempStr = params.substring(start, end) + "\n";
							            }
							            newParamsName += tempStr;// 最终拼成的字符串
							        }

							    } else {
							        // 将旧标签的值赋给新标签
							        newParamsName = params;
							    }
							    //将最终的字符串返回
							    return newParamsName
				        }
			        }

			    },{

    				type: "category",
			        data: [],
			        nameGap: '100',
			        boundaryGap: true,
			        show: false,
			    }],
			    series: [

			        {
			            name: '本月',
			            type: 'bar',
			            barWidth: 20,
			            data: [],
			            label: {
			            	show: true,
			            	position: 'right',
			            	color: '#333',
			            	formatter: function(params) {
			            		return params.value.toString().replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g,'$&,')
			            	}
			            },
			            emphasis: {
			            	itemStyle: {
			            		color: '#FFC93E'
			            	}
			            },
			            itemStyle: {
			            	normal: {
			            		color: '#54ACE2'
			            	},
			            	
			            }
			        },
			        {
			            name: '同期',
			            type: 'bar',
			            barWidth: 20,
			            barGap: '20%',
			            data: [],
			            label: {
			            	show: true,
			            	position: 'right',
			            	color: '#9B9B9B',
			            	formatter: function(params) {
			            		return params.value.toString().replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g,'$&,')
			            	}
			            },
			            emphasis: {
			            	itemStyle: {
			            		color: '#FFC93E'
			            	}
			            },
			            itemStyle: {
			            	normal: {
			            		color: '#E8E8E8'
			            	}
			            }
			        },
			        {	
			        	xAxisIndex: 1,
						yAxisIndex: 1,
			            type: 'bar',
			            barWidth: 20,
			            data: [],
			            itemStyle: {
							normal: {
							barBorderColor: 'transparent',
							color: 'transparent'
							}
            			}		
			            
			        }
			    ]
		  },
		  optionsshoushutezheng: {
		    tooltip: {
		        trigger: 'axis'
		    },
		    legend: {
		        data:[
		        	
		        ]
		    },
		    xAxis: [
		        {
		            type: 'category',
		            data: [],
		            axisPointer: {
		                type: 'shadow'
		            },
		            axisTick: {
		            	show: false
		            },
		            axisLine: {
		            	show: false
		            }
		        }
		    ],
		    yAxis: [
		        {
		            type: 'value',
		            axisLabel: {
		                formatter: '{value}'
		            },
		            axisTick: {
		            	show: false
		            },
		            axisLine: {
		            	show: false
		            },
		            splitLine: {
		            	lineStyle: {
		            		color: '#E6E6E6',
		            		type: 'dashed'
		            	}
		            }
		        },
		        {
		            type: 'value',
		            show: false
		        }
		    ],
		    series: [
		        {
		            name:'本月',
		            type:'bar',
		            barWidth: 21,
		            data:[],
		            itemStyle: {
		            	normal: {
		            		color: '#ABCBF4'
		            	}
		            },
		            emphasis: {
		            	itemStyle: {
		            		color: '#7FA3E8'
		            	}
		            }
		        }
		    ] 
		  },

		  optionsshoushutop: {
		    tooltip: {
		        trigger: 'axis',
		        enterable:true,
		        axisPointer: {
		            show: false
		        }
		    },
		    grid: {
		    	top: '15%',
		    	right: '3%',
		    	bottom: '15%',
		    	left: '8%'
		    },
		    legend: {
		        data:[
		        	{
		        		icon: 'circle',
		        		name: '本月'
		        	},
		        	{
		        		icon: 'circle',
		        		name: '同期'
		        	}
		        ],
		        top: '5%'
		    },
		    xAxis: [
		        {
		            type: 'category',
		            data: [],
		            axisTick: {
		            	show: false
		            },
		            axisLine: {
		            	show: false
		            }
		        }
		    ],
		    yAxis: 
		        {
		            type: 'value',
		            axisLabel: {
		                formatter: function(value) {
		                	if (parseInt(value) > 1000 || parseInt(value) == 1000) {
		                		return parseInt(value)/1000 + 'K'
		                	} else 
		                	return value
		                }
		            },
		            axisTick: {
		            	show: false
		            },
		            axisLine: {
		            	show: false
		            },
		            splitLine: {
		            	lineStyle: {
		            		color: '#E6E6E6',
		            		type: 'dashed'
		            	}
		            }
		        },
		    series: [
		        {
		            name:'本月',
		            type:'bar',
		            barWidth: 21,
		            data:[],
		            itemStyle: {
		            	normal: {
		            		color: '#95B9E8'
		            	}
		            },
		            emphasis: {
		            	itemStyle: {
		            		color: '#81A6ED'
		            	}
		            }
		        },
		        {
		            name:'同期',
		            type:'line',
		            symbolSize: 10,
		            data:[],
		            itemStyle: {
		            	normal: {
		            		color: '#FBC05A'
		            	}
		            }
		        }
		    ] 
		  },
		  optionsKoufazongequshi: {
		    tooltip: {
		        trigger: 'axis',
		        axisPointer: {
		                show: false
		            },
		    },
		    grid: {
		    	top: '15%',
		    	right: '3%',
		    	bottom: '15%',
		    	left: '8%'
		    },
		    legend: {
		        data:[
		        	{
		        		icon: 'circle',
		        		name: '本月'
		        	},
		        	{
		        		icon: 'circle',
		        		name: '同期'
		        	}
		        ],
		        top: '3%'
		    },
		    xAxis: [
		        {
		            type: 'category',
		            data: [],
		            
		            axisTick: {
		            	show: false
		            },
		            axisLine: {
		            	show: false
		            }
		        }
		    ],
		    yAxis: 
		        {
		            type: 'value',
		            axisLabel: {
		                formatter: function(value) {
		                	if (parseInt(value) > 1000 || parseInt(value) == 1000) {
		                		return parseInt(value)/1000 + 'K'
		                	} else 
		                	return value
		                }
		            },
		            axisTick: {
		            	show: false
		            },
		            axisLine: {
		            	show: false
		            },
		            splitLine: {
		            	lineStyle: {
		            		color: '#E6E6E6',
		            		type: 'dashed'
		            	}
		            }
		        },
		    series: [
		        {
		            name:'本月',
		            type:'bar',
		            barWidth: 21,
		            data:[],
		            itemStyle: {
		            	normal: {
		            		color: '#BFDD8C'
		            	}
		            },
		            emphasis: {
		            	itemStyle: {
		            		color: '#88C43F'
		            	}
		            }
		        },
		        {
		            name:'同期',
		            type:'line',
		            symbolSize: 10,
		            data:[],
		            itemStyle: {
		            	normal: {
		            		color: '#FBC05A'
		            	}
		            }
		        }
		    ] 
		  },
		  optionsMenzhenshoushutezheng: {
		  	title: {
		  		text: '单位：台',
		  		textStyle: {
		  			color: '#9B9B9B',
		  			fontSize: 14,
		  			fontWeight: 'normal'
		  		},
		  		itemGap: 20,
		  		padding: [5, 30]
		  	},
		    tooltip: {
		        trigger: 'axis',
		        enterable:true,
		        axisPointer: {
		            show: false
		        }
		    },
		    grid: {
		    	bottom: '18%',
		    	top: '15%',
		    	right: '0',
		    	left: '15%'
		    },
		    xAxis: [
		        {
		            type: 'category',
		            data: ['外科','内科','其他'],
		            // axisPointer: {
		            //     type: 'shadow'
		            // },
		            axisLine: {
		            	show: false
		            },
		            axisTick: {
		            	show: false
		            }
		        }
		    ],
		    yAxis: [
		        {
		            type: 'value',
		            axisLabel: {
		                formatter: function(value) {
		                	// let num = parseInt(value)/1000
		                	// return num + 'K'
		                	if (parseInt(value) > 1000 || parseInt(value) == 1000) {
		                		return parseInt(value)/1000 + 'K'
		                	} else 
		                	return value
		                }
		                // formatter: '{value}'
		            },
		            axisLine: {
		            	show: false
		            },
		            axisTick: {
		            	show: false
		            },
		            splitLine: {
		            	lineStyle: {
		            		type: 'dashed',
		            		color: '#E6E6E6'
		            	}
		            }
		        },
		        {
		            type: 'value',
		            show: false
		        }
		    ],
		    series: [
		        {
		            name:'本月',
		            type:'bar',
		            barWidth: 21,
		            data:[2.0, 4.9, 7.0],
		            itemStyle: {
		            	normal: {
		            		color: '#5CB5CA '
		            	}
		            },
		            emphasis: {
		            	itemStyle: {
		            		color: '#2C98B0'
		            	}
		            },
		            label: {
		            	show: true,
		            	position: 'top',
		            	color: '#B0B0B0'
		            }
		        }
		    ] 
		  },
		  optionsshoushubottom: {
		    // title : {
		    //     text: '某站点用户访问来源',
		    //     subtext: '纯属虚构',
		    //     x:'center'
		    // },
		    tooltip : {
		        trigger: 'item',
		        formatter: "{a} <br/>{b} : {c} ({d}%)"
		    },
		    legend: {
		        orient: 'vertical',
		        bottom: 60,
		        right: '40',
		        data: ['特级','甲级', '乙级']
		    },
		    series : [
		        {
		            name: '访问来源',
		            type: 'pie',
		            radius : '60%',
		            center: ['40%', '50%'],
		            selectedMode: 'single',
		            label: {
	            		show: false
	            	},
		            data:[
		                {
		                	value:335, 
		                	name:'特级',
		                	itemStyle: {
		                		normal: {
		                			color: '#E8D352'
		                		}
		                	}
		                },
		                
		                {
		                	value:510, 
		                	name:'乙级',
		                	itemStyle: {
		                		normal: {
		                			color: '#F3BA8B'
		                		}
		                	}
		                },
		                {
		                	value:710, 
		                	name:'丙级',
		                	itemStyle: {
		                		normal: {
		                			color: '#91AFEC'
		                		}
		                	}
		                }
		                // {
		                // 	value:310, 
		                // 	name:'甲级',
		                // 	itemStyle: {
		                // 		normal: {
		                // 			color: '#92CF9F'
		                // 		}
		                // 	}
		                // },
		                // {
		                // 	value:210, 
		                // 	name:'丁级',
		                // 	itemStyle: {
		                // 		normal: {
		                // 			color: '#72B8EF'
		                // 		}
		                // 	}
		                // },
		                // {
		                // 	value:170, 
		                // 	name:'戊级',
		                // 	itemStyle: {
		                // 		normal: {
		                // 			color: '#B0A8DE'
		                // 		}
		                // 	}
		                // },
		                // {
		                // 	value:220, 
		                // 	name:'乙庚',
		                // 	itemStyle: {
		                // 		normal: {
		                // 			color: '#63C2C6'
		                // 		}
		                // 	}
		                // }
		            ],
		            itemStyle: {
		                emphasis: {
		                    shadowBlur: 10,
		                    shadowOffsetX: 0,
		                    shadowColor: 'rgba(0, 0, 0, 0.5)'
		                }
		            }
		        }
		    ]
			},
		  optionsMedicinetop:{
		    tooltip: {
		        trigger: 'axis',
		        enterable:true,
		        axisPointer: {
		            show: false
		        },
		        // formatter: function(value) {

		        // }
		    },
		    grid: {
		    	top: '15%',
		    	right: '3%',
		    	bottom: '15%',
		    	left: '8%'
		    },
		    legend: {
		    	top: '3%',
		    	show: true,
		        data:[
		        	{
		        		icon: 'circle',
		        		name: '本月住院'
		        	},{
		        		icon: 'circle',
		        		name: '本月门急诊'
		        	},
		        	{
		        		icon: 'circle',
		        		name: '同期住院'
		        	},
		        	{
		        		icon: 'circle',
		        		name: '同期门急诊'
		        	},
		        ]
		    },
		    xAxis: [
		        {
		            type: 'category',
		            data: [],
		            axisTick: {
		            	show: false
		            },
		            axisLine: {
		            	show: false
		            }
		        }
		    ],
		    yAxis: 
		        {
		            type: 'value',
		            axisLabel: {
		                formatter: function(value) {
		                	if(value > 1000) {
		                		return parseInt(value)/1000 + 'K'
		                	} else {
		                		return value
		                	}
		                }
		            },
		            axisTick: {
		            	show: false
		            },
		            axisLine: {
		            	show: false
		            },
		            splitLine: {
		            	lineStyle: {
		            		color: '#E6E6E6',
		            		type: 'dashed'
		            	}
		            }
		        },
		    series: [
		    	{
		            name:'本月住院',
		            type:'bar',
		            barWidth: 21,
		            stack: '本月',
		            data:[],
		            itemStyle: {
		            	normal: {
		            		color: '#A9A4EC'
		            	}
		            }
		        },
		    	{
		            name:'本月门急诊',
		            type:'bar',
		            barWidth: 21,
		            stack: '本月',
		            data:[],
		            itemStyle: {
		            	normal: {
		            		color: '#C9C6EF'
		            	}
		            }
		        },
		        
		        {
		            name:'同期住院',
		            type:'bar',
		            barWidth: 21,
		            stack: '同期',
		            data:[],
		            itemStyle: {
		            	normal: {
		            		color: '#79C1F3'
		            	}
		            },
		            emphasis: {
		            	label: false
		            }
		        },
		        {
		            name:'同期门急诊',
		            type:'bar',
		            barWidth: 21,
		            stack: '同期',
		            data:[],
		            itemStyle: {
		            	normal: {
		            		color: '#89DCEF'
		            	}
		            }
		        }
		    ] 
		  },
		  optionshaocaitop:{
		    tooltip: {
		        trigger: 'axis',
		        axisPointer: {
		        	show: false
		        }
		    },
		    grid: {
		    	top: '15%',
		    	right: '3%',
		    	bottom: '15%',
		    	left: '8%'
		    },
		    legend: {
		        data:[
		        	{
		        		icon: 'circle',
		        		name: '本月'
		        	},
		        	{
		        		icon: 'circle',
		        		name: '同期'
		        	}
		        ],
		        top: '3%',
		    },
		    xAxis: [
		        {
		            type: 'category',
		            data: [],
		            // axisPointer: {
		            //     // type: 'shadow'
		            //     show: false
		            // },
		            axisLine: {
		            	show: false
		            },
		            axisTick: {
		            	show: false
		            }
		        }
		    ],
		    yAxis: 
		        {
		            type: 'value',
		            axisLabel: {
		                formatter: function(value) {
		                	if (parseInt(value) > 1000 || parseInt(value) == 1000) {
		                		return parseInt(value)/1000 + 'K'
		                	} else 
		                	return value
		                }
		            },
		            axisLine: {
		            	show: false
		            },
		            axisTick: {
		            	show: false
		            },
		            splitLine: {
		            	lineStyle: {
		            		type: 'dashed',
		            		color: '#E6E6E6'
		            	}
		            }
		        },
		    series: [
		        {
		            name:'本月',
		            type:'bar',
		            barWidth: 21,
		            data:[],
		            itemStyle: {
		            	normal: {
		            		color: '#89CFD2'
		            	}
		            },
		            emphasis: {
		            	itemStyle: {
		            		color: '#49B6B9'
		            	}
		            }
		        },
		        {
		            name:'同期',
		            type:'line',
		            symbolSize: 10,
		            data:[],
		            itemStyle: {
		            	normal: {
		            		color: '#FBC05A'
		            	}
		            }
		        }
		    ] 
		  },
		  optionsZhuchu : {
		    tooltip : {
		        trigger: 'item',
		        formatter: "{b} : {c}<br>占比：{d}%"
		    },
		    
		    // selectedMode: 'single',
            // label: {
            // 	show: false
            // },
		    legend: {
		        orient: 'vertical',
		        bottom: 20,
		        itemWidth: 12,
		        itemHeight: 12,
		   		padding: 10,
		   		align: 'right',
		        right: 10,
		        bottom: 10,
		        // left: 'right',
		        data: [
			        {
			        	icon: 'circle',
			        	name: '治愈'
			        },
			        {
			        	icon: 'circle',
			        	name: '好转'
			        }, 
			        {
			        	icon: 'circle',
			        	name: '未愈'
			        }, 
			        {
			        	icon: 'circle',
			        	name: '死亡'
			        }
		        ]
		    },
		    series : [
		        {
		            name: '访问来源',
		            type: 'pie',
		            radius : '55%',
		            center: ['50%', '50%'],
		            selectedMode: 'single',
			        label: {
	            		show: false
	            	},
		            data:[
		                {
		                	name:'治愈',
		                	itemStyle: {
		                		normal: {
		                			color: '#72B8EF'
		                		}
		                	}
		                },
		                {
		                	name:'好转',
		                	itemStyle: {
		                		normal: {
		                			color: '#CFDF87'
		                		}
		                	}
		                },
		                {
		                	name:'未愈',
		                	itemStyle: {
		                		normal: {
		                			color: '#63C2C6'
		                		}
		                	}
		                },
		                {
		                	name:'死亡',
		                	itemStyle: {
		                		normal: {
		                			color: '#8E9AB2'
		                		}
		                	}
		                }
		            ],
		            itemStyle: {
		                emphasis: {
		                    shadowBlur: 10,
		                    shadowOffsetX: 0,
		                    shadowColor: 'rgba(0, 0, 0, 0.5)'
		                }
		            }
		        }
		    ]
			},
			optionsMenzhenshoushuleixing: {
		    tooltip : {
		        trigger: 'item',
		        formatter: "{b} : {c}<br>占比：{d}%"
		    },
		    // gird: {
		    // 	bo
		    // },
		    legend: {
		        orient: 'vertical',
		        bottom: 10,
		        itemWidth: 10,
		        itemHeight: 10,
		   			padding: 10,
		        // left: 'right',
		        align: 'right',
		        right: 10,
		        bottom: 10,
		        data: [
			        {
			        	icon: 'circle',
			        	name: '特级'
			        },
			        {
			        	icon: 'circle',
			        	name: '甲级'
			        }, 
			        {
			        	icon: 'circle',
			        	name: '乙级'
			        }, 
			        {
			        	icon: 'circle',
			        	name: '丙级'
			        }, 
			        {
			        	icon: 'circle',
			        	name: '丁级'
			        }, 
			        {
			        	icon: 'circle',
			        	name: '戊级'
			        }, 
			        {
			        	icon: 'circle',
			        	name: '己级'
			        }, 
			        {
			        	icon: 'circle',
			        	name: '庚级'
			        }
		        ]
		    },
		    series : [
		        {
		            name: '访问来源',
		            type: 'pie',
		            radius : '60%',
		            center: ['50%', '50%'],
		            selectedMode: 'single',
		            label: {
	            		show: false
	            	},
		            data:[
		                { 
		                	name:'特级',
		                	itemStyle: {
		                		normal: {
		                			color: '#E8D352'
		                		}
		                	}
		                },
		                {
		                	name:'甲级',
		                	itemStyle: {
		                		normal: {
		                			color: '#91AFEC'
		                		}
		                	}
		                },
		                {
		                	name:'乙级',
		                	itemStyle: {
		                		normal: {
		                			color: '#63C2C6'
		                		}
		                	}
		                },
		                {
		                	name:'丙级',
		                	itemStyle: {
		                		normal: {
		                			color: '#B0A8DE'
		                		}
		                	}
		                },
		                {
		                	name:'丁级',
		                	itemStyle: {
		                		normal: {
		                			color: '#72B8EF'
		                		}
		                	}
		                },
		                {
		                	name:'戊级',
		                	itemStyle: {
		                		normal: {
		                			color: '#F3BA8B'
		                		}
		                	}
		                },
		                {
		                	name:'己级',
		                	itemStyle: {
		                		normal: {
		                			color: '#92CF9F'
		                		}
		                	}
		                },
		                {
		                	name:'庚级',
		                	itemStyle: {
		                		normal: {
		                			color: '#f79300'
		                		}
		                	}
		                }
		            ],
		            itemStyle: {
		                emphasis: {
		                    shadowBlur: 10,
		                    shadowOffsetX: 0,
		                    shadowColor: 'rgba(0, 0, 0, 0.5)'
		                }
		            }
		        }
		    ]
			},
			optionsZhuyuanshoushuleixing: {
		    tooltip : {
		        trigger: 'item',
		        formatter: "{b} : {c}<br>占比：{d}%"
		    },
		    legend: {
		        orient: 'vertical',
		        bottom: 20,
		        itemWidth: 12,
		        itemHeight: 12,
		   			padding: 10,
		        // left: 'right',
		        align: 'right',
		        right: 34,
		        data: [
			        {
			        	icon: 'circle',
			        	name: '特级'
			        },
			        {
			        	icon: 'circle',
			        	name: '甲级'
			        }, 
			        {
			        	icon: 'circle',
			        	name: '乙级'
			        }, 
			        {
			        	icon: 'circle',
			        	name: '丙级'
			        }, 
			        {
			        	icon: 'circle',
			        	name: '丁级'
			        }, 
			        {
			        	icon: 'circle',
			        	name: '戊级'
			        }, 
			        {
			        	icon: 'circle',
			        	name: '庚级'
			        }
		        ]
		    },
		    series : [
		        {
		            name: '访问来源',
		            type: 'pie',
		            radius : '60%',
		            center: ['50%', '50%'],
		            selectedMode: 'single',
		            label: {
	            		show: false
	            	},
		            data:[
		                {
		                	name:'特级',
		                	itemStyle: {
		                		normal: {
		                			color: '#E8D352'
		                		}
		                	}
		                },
		                {
		                	name:'甲级',
		                	itemStyle: {
		                		normal: {
		                			color: '#91AFEC'
		                		}
		                	}
		                },
		                {
		                	name:'乙级',
		                	itemStyle: {
		                		normal: {
		                			color: '#63C2C6'
		                		}
		                	}
		                },
		                {
		                	name:'丙级',
		                	itemStyle: {
		                		normal: {
		                			color: '#B0A8DE'
		                		}
		                	}
		                },
		                {
		                	name:'丁级',
		                	itemStyle: {
		                		normal: {
		                			color: '#72B8EF'
		                		}
		                	}
		                },
		                {
		                	name:'戊级',
		                	itemStyle: {
		                		normal: {
		                			color: '#F3BA8B'
		                		}
		                	}
		                },
		                {
		                	name:'庚级',
		                	itemStyle: {
		                		normal: {
		                			color: '#92CF9F'
		                		}
		                	}
		                }
		            ],
		            itemStyle: {
		                emphasis: {
		                    shadowBlur: 10,
		                    shadowOffsetX: 0,
		                    shadowColor: 'rgba(0, 0, 0, 0.5)'
		                }
		            }
		        }
		    ]
			},
			optionsZhuzhen : {
		    tooltip : {
		        trigger: 'item',
		        formatter: "{b} : {c}<br> 占比：{d}% "
		    },
		    legend: {
		        orient: 'vertical',
		        bottom: 20,
		        itemWidth: 12,
		        itemHeight: 12,
		        // left: 'right',
		        right: 10,
		        bottom: 10,
		        align: 'right',
		        data: [
			        {
			        	icon: 'circle',
			        	name: '急诊住院'
			        },
		        	{
		        		icon: 'circle',
		        		name: '普通住院'
		        	}
		        ]
		    },
		    series : [
		        {
		            type: 'pie',
		            radius : '50%',
		            center: ['50%', '50%'],
		            selectedMode: 'single',
		            label: {
		            	show: false,
		            	formatter: '{b}\n总额：{c} \n占比： {d}%\n'
		            },
		            // labelLine: {
		            // 	normal:{  
              //       		length: 10,
              //       		length2: 5,   
              //   		} 
		            // },
		            data:[
		                {
		                	value:335, 
		                	name:'急诊住院',
		                	itemStyle: {
		                		normal: {
		                			color: '#72B8EF'
		                		}
		                	}
		                },
		                {
		                	value:810, 
		                	name:'普通住院',
		                	itemStyle: {
		                		normal: {
		                			color: '#CFDF87'
		                		}
		                	}
		                }
		            ],
		            itemStyle: {
		                emphasis: {
		                    shadowBlur: 10,
		                    shadowOffsetX: 0,
		                    shadowColor: 'rgba(0, 0, 0, 0.5)'
		                }
		            }
		        }
		    ]
			},
			optionsyaopinzhong: {
			    tooltip : {
			        trigger: 'item',
			        formatter: "{b} : {c}<br>占比：{d}%"
			    },
			    legend: {
			        orient: 'vertical',
			        bottom: 20,
			        itemWidth: 10,
			        itemHeight: 10,
			        align: 'right',
			        right: 10,
			        bottom: 10,
			        data: [
			        	{
			        		icon: 'circle',
			        		name: '西药',
			        		textStyle: {
	        						fontSize: '12'
	    						}
			        	},
			        	{
			        		icon: 'circle',
			        		name: '中成药'
			        	}, 
			        	{
			        		icon: 'circle',
			        		name: '中药饮片'
			        	}
			        ]
			    },
			    series : [
			        {
			            type: 'pie',
			            radius : '55%',
			            center: ['50%', '50%'],
			            selectedMode: 'single',
			            label: {
			            	show: false,
			            	formatter: '{b}\n总额：{c} \n占比： {d}%\n'
			            },
			            // labelLine: {
			            // 	normal:{  
	              //       		length: 10,
	              //       		length2: 5,   
	              //   		} 
			            // },
			            data:[
			                {
			                	name:'西药',
			                	itemStyle: {
			                		normal: {
			                			color: '#91AFEC'
			                		}
			                	}
			                },
			                {
			                	name:'中成药',
			                	itemStyle: {
			                		normal: {
			                			color: '#CFDF87'
			                		}
			                	}
			                },
			                {
			                	name:'中药饮片',
			                	itemStyle: {
			                		normal: {
			                			color: '#63C2C6'
			                		}
			                	}
			                }
			            ],
			            itemStyle: {
			                emphasis: {
			                    shadowBlur: 10,
			                    shadowOffsetX: 0,
			                    shadowColor: 'rgba(0, 0, 0, 0.5)'
			                }
			            }
			        }
			    ]
			},
			optionsyaopinqushi: {
		    // title : {
		    //     text: '某站点用户访问来源',
		    //     subtext: '纯属虚构',
		    //     x:'center'
		    // },
		    tooltip : {
		        trigger: 'item',
		        formatter: "{b} : {c}<br>占比：{d}%"
		    },
		    // legend: {
		    //     orient: 'vertical',
		    //     bottom: 20,
		    //     left: 'right',
		    //     data: ['门诊用药','急诊用药']
		    // },
		    series : [
		        {
		            name: '访问来源',
		            type: 'pie',
		            radius : '60%',
		            center: ['50%', '40%'],
		            selectedMode: 'single',
		            label: {
	            		show: false
	            	},
		            data:[
		                {
		                	value:335, 
		                	name:'门诊用药',
		                	itemStyle: {
		                		normal: {
		                			color: '#72B8EF'
		                		}
		                	}
		                },
		                {
		                	value:310, 
		                	name:'急诊用药',
		                	itemStyle: {
		                		normal: {
		                			color: '#92CF9F'
		                		}
		                	}
		                }
		            ],
		            itemStyle: {
		                emphasis: {
		                    shadowBlur: 10,
		                    shadowOffsetX: 0,
		                    shadowColor: 'rgba(0, 0, 0, 0.5)'
		                }
		            }
		        }
		    ]
			},
			optionshaocaimenji: {
			    tooltip : {
			        trigger: 'item',
			        formatter: "{b} : {c}<br>占比：{d}%"
			    },
			    legend: {
			        orient: 'vertical',
			        bottom: 20,
			        // left: 'right',
			        right: 10,
			        align: 'right',
			        bottom: 10,
			        itemWidth: 10,
			        data: [
			        	{
			        		icon: 'circle',
			        		name: '计费耗材'
			        	},
			        	{
			        		icon: 'circle',
			        		name: '非计费耗材'
			        	}
			        ]
			    },
			    series : [
			        {
			            type: 'pie',
			            radius : '55%',
			            center: ['50%', '50%'],
			            selectedMode: 'single',
			            label: {
			            	show: false,
			            	formatter: '{b}\n总额：{c} \n占比： {d}%\n'
			            },
			            // labelLine: {
			            // 	normal:{  
	              //       		length: 10,
	              //       		length2: 5,   
	              //   		} 
			            // },
			            data:[
			                {
			                	value:335, 
			                	name:'计费耗材',
			                	itemStyle: {
			                		normal: {
			                			color: '#72B8EF'
			                		}
			                	}
			                },
			                {
			                	value:310, 
			                	name:'非计费耗材',
			                	itemStyle: {
			                		normal: {
			                			color: '#92CF9F'
			                		}
			                	}
			                }
			            ],
			            itemStyle: {
			                emphasis: {
			                    shadowBlur: 10,
			                    shadowOffsetX: 0,
			                    shadowColor: 'rgba(0, 0, 0, 0.5)'
			                }
			            }
			        }
			    ]
			},
			optionsAnquanbukoufa: {
		    // title : {
		    //     text: '某站点用户访问来源',
		    //     subtext: '纯属虚构',
		    //     x:'center'
		    // },
		    tooltip : {
		    	show: true,
		        trigger: 'item',
		        formatter: "{b} : {c}<br>占比：{d}%"
		    },
		    legend: {
		        orient: 'vertical',
		        bottom: 10,
		        // left: 'right',
		        right: 10,
		        align: 'right',
		        itemWidth: 8,
		        data: [
		        	{
		        		icon: 'circle',
		        		name: '扣科室绩效'
		        	},
		        	{
		        		icon: 'circle',
		        		name: '扣个人绩效'
		        	}
		        ]
		    },

		    series : [
		        {
		            name: '访问来源',
		            type: 'pie',
		            radius : '55%',
		            center: ['50%', '50%'],
		            selectedMode: 'single',
		            label: {
		            	show: false,
		            	formatter: '{b}\n总额：{c} \n占比： {d}%\n'
		            },
		            labelLine: {
		            	normal:{  
                    		length: 10,
                    		length2: 5,   
                		} 
		            },
		            data:[
		                { 
		                	name:'扣科室绩效',
		                	itemStyle: {
		                		normal: {
		                			color: '#72B8EF'
		                		}
		                	}
		                },
		                {
		                	name:'扣个人绩效',
		                	itemStyle: {
		                		normal: {
		                			color: '#92CF9F'
		                		}
		                	}
		                }
		            ],
		            itemStyle: {
		                emphasis: {
		                    shadowBlur: 10,
		                    shadowOffsetX: 0,
		                    shadowColor: 'rgba(0, 0, 0, 0.5)'
		                }
		            }
		        }
		    ]
			},
			optionsJufukoufa: {
			    tooltip : {
			        trigger: 'item',
			        formatter: "{b} : {c}<br>占比：{d}%"
			    },
			    legend: {
			        orient: 'vertical',
			        bottom: 10,
			        right: 10,
			        align: 'right',
			        itemWidth: 8,
			        data: [
			        	{
			        		icon: 'circle',
			        		name: '药品'
			        	},
			        	{
			        		icon: 'circle',
			        		name: '材料'
			        	},
			        	{
			        		icon: 'circle',
			        		name: '检查治疗费'
			        	}
			        ]
			    },
			    series : [
			        {
			            name: '访问来源',
			            type: 'pie',
			            radius : '55%',
			            center: ['50%', '50%'],
			            selectedMode: 'single',
			            label: {
			            	show: false,
			            	formatter: '{b}\n总额：{c} \n占比： {d}%\n'
			            },
			            labelLine: {
			            	normal:{  
	                    		length: 10,
	                    		length2: 5,   
	                		} 
			            },
			            data:[
			                {
			                	name:'药品',
			                	itemStyle: {
			                		normal: {
			                			color: '#91AFEC'
			                		}
			                	}
			                },
			                {
			                	name:'材料',
			                	itemStyle: {
			                		normal: {
			                			color: '#CFDF87'
			                		}
			                	}
			                },
			                { 
			                	name:'检查治疗费',
			                	itemStyle: {
			                		normal: {
			                			color: '#63C2C6'
			                		}
			                	}
			                }
			            ],
			            itemStyle: {
			                emphasis: {
			                    shadowBlur: 10,
			                    shadowOffsetX: 0,
			                    shadowColor: 'rgba(0, 0, 0, 0.5)'
			                }
			            }
			        }
			    ]
			},
			optionsQitakoufa: {
		    tooltip : {
		        trigger: 'item',
		        formatter: "{b} : {c}<br>占比：{d}%"
		    },
		    legend: {
		        orient: 'vertical',
		        bottom: 10,
		        // left: 'right',
		        right: 10,
		        align: 'right',
		        itemWidth: 8,
		        data: [
		        	{
		        		icon: 'circle',
		        		name: '专家诊迟诊'
		        	},
		        	{
		        		icon: 'circle',
		        		name: '普通诊迟诊'
		        	}
		        ]
		    },
		    series : [
		        {
		            name: '访问来源',
		            type: 'pie',
		            radius : '55%',
		            center: ['50%', '50%'],
		            selectedMode: 'single',
		            label: {
		            	show: false,
		            	formatter: '{b}\n总额：{c} \n占比： {d}%\n'
		            },
		            labelLine: {
		            	normal:{  
                    		length: 10,
                    		length2: 5,   
                		} 
		            },
		            data:[
		                {
		                	name:'专家诊迟诊',
		                	itemStyle: {
		                		normal: {
		                			color: '#72B8EF'
		                		}
		                	}
		                },
		                {
		                	name:'普通诊迟诊',
		                	itemStyle: {
		                		normal: {
		                			color: '#92CF9F'
		                		}
		                	}
		                }
		            ],
		            itemStyle: {
		                emphasis: {
		                    shadowBlur: 10,
		                    shadowOffsetX: 0,
		                    shadowColor: 'rgba(0, 0, 0, 0.5)'
		                }
		            }
		        }
		    ]
			},
			optionshaocaileibie: {
		    // title : {
		    //     text: '某站点用户访问来源',
		    //     subtext: '纯属虚构',
		    //     x:'center'
		    // },
			    tooltip : {
			        trigger: 'item',
			        formatter: "{b} : {c}<br>占比：{d}%"
			    },
			    legend: {
			        orient: 'vertical',
			        bottom: 20,
			        // left: 'right',
			        right: 10,
			        align: 'right',
			        bottom: 10,
			        itemWidth: 10,
			        data: [
			        	{
			        		icon: 'circle',
			        		name: '护理耗材'
			        	},
			        	{
			        		icon: 'circle',
			        		name: '非护理耗材'
			        	}
			        ]
			    },
			    series : [
			        {
			            type: 'pie',
			            radius : '55%',
			            center: ['50%', '50%'],
			            selectedMode: 'single',
			            label: {
			            	show: false,
			            	formatter: '{b}\n总额：{c} \n占比： {d}%\n'
			            },
			            labelLine: {
			            	normal:{  
	                    		length: 10,
	                    		length2: 5,   
	                		} 
			            },
			            data:[
			                {
			                	value:335, 
			                	name:'护理耗材',
			                	itemStyle: {
			                		normal: {
			                			color: '#CFDF87'
			                		}
			                	}
			                },
			                {
			                	value:310, 
			                	name:'非护理耗材',
			                	itemStyle: {
			                		normal: {
			                			color: '#91AFEC'
			                		}
			                	}
			                }
			            ],
			            itemStyle: {
			                emphasis: {
			                    shadowBlur: 10,
			                    shadowOffsetX: 0,
			                    shadowColor: 'rgba(0, 0, 0, 0.5)'
			                }
			            }
			        }
			    ]
			},
		  optionsMenRightBottomleft : {
		    // title : {
		    //     text: '某站点用户访问来源',
		    //     subtext: '纯属虚构',
		    //     x:'center'
		    // },
		    tooltip : {
		        trigger: 'item',
		        formatter: "{b} : {c}<br>占比：{d}%"
		    },
		    // legend: {
		    //     orient: 'vertical',
		    //     bottom: 20,
		    //     left: 'right',
		    //     data: ['成功人次','失败人次']
		    // },
		    series : [
		        {
		            type: 'pie',
		            radius : '60%',
		            center: ['50%', '40%'],
		            selectedMode: 'single',
		            label: {
	            		show: false
	            	},
		            data:[
		                {
		                	value:335, 
		                	name:'成功人次',
		                	itemStyle: {
		                		normal: {
		                			color: '#91AFEC'
		                		}
		                	}
		                },
		                {
		                	value:310, 
		                	name:'失败人次',
		                	itemStyle: {
		                		normal: {
		                			color: '#CFDF87'
		                		}
		                	}
		                }
		            ],
		            itemStyle: {
		                emphasis: {
		                    shadowBlur: 10,
		                    shadowOffsetX: 0,
		                    shadowColor: 'rgba(0, 0, 0, 0.5)'
		                }
		            }
		        }
		    ]
			},
		  optionsMenRightBottom: {
		    tooltip : {
		        formatter: "业务指标 : {c}%"
		    },
		    series: [
	        {
	            name: '业务指标',
	            type: 'gauge',
	            radius: '90%',
	            startAngle: 200,
	            endAngle: -20,
	            axisLabel: {
	            	fontSize: 12
	            },
	            detail: {formatter:'{value}%', show: true,fontSize: 24,},
	            data: [
	            	{
	            		itemStyle: {
	            			normal: {
	            				fontSize: 12
	            			}
	            		}
	            	}
	           	],
	            axisLine: {
	                show: true,
	                lineStyle: {
	                    color: [[1, '#7FCDF0']],
	                    width: 10,
	                }
	            },
	            splitLine: {
	                show: true,
	                length: 15,
	                lineStyle: {
	                	color: '#7FCDF0',
	                	width: 1
	                }
	            },
	            axisTick: {
	                length: 1,
	                lineStyle: {
	                    width: 1,
	                    color: 'auto'
	                }
	            },
	            axisLabel: {
	                show: false
	            },
	            pointer: {
	                length: '40%',
	                width: 4
	            },
	            title: {
	                show: false
	            }
	        }
	    	]
			},
		  optionsMenRightTop: {
		    // tooltip: {
		    //     trigger: 'axis'
		    // },
		    tooltip: {
		        trigger: 'axis',
		        enterable:true,
		        axisPointer: {
		            show: false
		        }
			},
			grid: {
		    	top: '15%',
		    	right: '3%',
		    	bottom: '15%',
		    	left: '8%'
		    },
		    legend: {
		        data:[
		        	{
		        		icon: 'circle',
		        		name: '本月'
		        	},
		        	{
		        		icon: 'circle',
		        		name: '同期'
		        	}
		        ],
		        top: '3%'
		    },
		    xAxis: [
		        {
		            type: 'category',
		            data: [],
		            // axisPointer: {
		            //     show: false
		            // },
		            axisTick: {
		            	show: false
		            },
		            axisLine: {
		            	show: false
		            }
		        }
		    ],
		    yAxis: 
		        {
		            type: 'value',
		            axisLabel: {
		                formatter: function(value) {
		                	if (parseInt(value) > 1000 || parseInt(value) == 1000) {
		                		return parseInt(value)/1000 + 'K'
		                	} else 
		                	return value
		                }
		            },
		            axisTick: {
		            	show: false
		            },
		            axisLine: {
		            	show: false
		            },
		            splitLine: {
		            	lineStyle: {
		            		color: '#E6E6E6',
		            		type: 'dashed'
		            	}
		            }
		        },
		    series: [
		        {
		            name:'本月',
		            type:'bar',
		            barWidth: 21,
		            data:[],
		            itemStyle: {
		            	normal: {
		            		color: '#77B3DD'
		            	}
		            },
		            emphasis: {
		            	itemStyle: {
		            		color: '#2FA4DB'
		            	}
		            }
		        },
		        {
		            name:'同期',
		            type:'line',
		            symbolSize: 10,
		            data:[],
		            itemStyle: {
		            	normal: {
		            		color: '#FBC05A'
		            	}
		            },
		            emphasis: {
		            	color: '#FBC05A',
		            	symbol: 'circle'
		            }
		        }
		    ]} 
		  }
	},
	// created () {

	// },
	methods: {
		//数据格式化
		number(data) {
  			if(data != null) {
  				return data.toFixed(2).replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g,'$&,')
  			} else {
  				return
  			}
  		},
  		numberInt(data) {
  			if(data != null) {
  				return data.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g,'$&,')
  			} else {
  				return
  			}
  		}, 
		backClick () {
			this.$router.push('/all')
		},
		barMouseLeave(type) {
			if (type === 'out') {
				if(this.outHover === false) {
					this.outShow = false	
				}
			} else if (type === 'average') {
				if(this.averageHover === false) {
				this.averageShow = false
				
		}
				
			} else if(type === 'use'){
				if(this.useHover === false) {
				
				{this.useShow = false}
		}
				
			} else if(type === 'other') {
				if(this.otherHover === false) {
				{this.otherShow = false}
		}
			}	
		},
		barMouseEnter(type) {
			if (type === 'out') {
				if(this.outHover === false) {
					if(this.outShow === false)
					{this.outShow = true}
					
				}
			} else if (type === 'average') {
				if(this.averageHover === false) {
				if(this.averageShow === false)
				{this.averageShow = true}
				
		}
				
			} else if(type === 'use'){
				if(this.useHover === false) {
				if(this.useShow === false)
				{this.useShow = true}
				
		}
				
			} else if(type === 'other') {
				if(this.otherHover === false) {
				if(this.otherShow === false)
				{this.otherShow = true}
				
		}
			}	
		},
		barClick (type) {
			this.outShow = false
			this.averageShow = false
			this.useShow = false
			this.otherShow = false
			this.outHover = false
			this.averageHover = false
			this.useHover = false
			this.otherHover = false
			this.options.series[0].data = []
			this.options.series[1].data = []
			this.options.yAxis[0].data = []
			if (type === 'out') {
				this.outShow = true
				this.outHover = true
				if (this.type === '门急诊情况') {
					this.typeValue = 'medicalPeo'
					this.busEmeMonthHosMore()
				} else if (this.type === '住院情况') {
					this.typeValue = 'outTotalPeo'
					this.busHosMonthHosMore()
				}  else if (this.type === '手术情况') {
					this.typeValue = 'surgeryNum'
					this.busSurMonthHosMore()
					this.menzhenshoushushow = true
				} else if (this.type === '药品使用情况'){
					this.typeValue = 'medIncomeTotal'
					this.busMedMonthHosMore()
				} else if (this.type === '耗材使用情况') {
					this.typeValue = 'conTotal'
					this.busConMonthHosMore()
				} else if (this.type === '扣罚情况'){
					this.typeValue = 'penTotal'
					this.busPenMonthHosMore()
				}
				this.myChart = echarts.init(this.$refs.list)
				this.myChart.setOption(this.options)
			} else if (type === 'average') {
				this.averageShow = true
				this.averageHover = true
				if (this.type === '门急诊情况') {
			
						this.typeValue = 'outpatientPeo'
						this.busEmeMonthHosMore()
				} else if (this.type === '住院情况') {
					this.typeValue = 'aveHosDay'
					this.busHosMonthHosMore()
				}  else if (this.type === '手术情况') {
					this.typeValue = 'surgeryHos'
					this.busSurMonthHosMore()
					this.menzhenshoushushow = false
				} else if (this.type === '药品使用情况'){
					this.typeValue = 'medHosNum'
					this.busMedMonthHosMore()
				} else if (this.type === '耗材使用情况') {
					this.typeValue = 'conHosNum'
					this.busConMonthHosMore()
				} else if (this.type === '扣罚情况'){
					this.typeValue = 'safePen'
					this.busPenMonthHosMore()
				}
				this.myChart = echarts.init(this.$refs.list)
				this.myChart.setOption(this.options)
			} else if(type === 'use'){
				this.useShow = true
				this.useHover= true
				if (this.type === '门急诊情况') {
					this.typeValue = 'emergencyPeo'
					this.busEmeMonthHosMore()
				} else if (this.type === '住院情况') {
					this.typeValue = 'bedRate'
					this.busHosMonthHosMore()
				}  else if (this.type === '手术情况') {
					this.typeValue = 'surgeryEme'
					this.busSurMonthHosMore()
				} else if (this.type === '药品使用情况'){
					this.typeValue = 'medMemNum'
					this.busMedMonthHosMore()
				}  else if (this.type === '耗材使用情况') {
					this.typeValue = 'conEmeNum'
					this.busConMonthHosMore()
				} else if (this.type === '扣罚情况'){
					this.typeValue = 'refusePay'
					this.busPenMonthHosMore()
				}
				this.myChart = echarts.init(this.$refs.list)
				this.myChart.setOption(this.options)
			} else if(type === 'other') {
				this.otherShow = true
				this.otherHover = true
				if (this.type === '扣罚情况'){
					this.typeValue = 'otherPay'
					this.busPenMonthHosMore()
				}
				this.myChart = echarts.init(this.$refs.list)
				this.myChart.setOption(this.options)
			} else {
				this.otherShow = true
			}
		},
	  refresh (isBtnRefresh) {      
	      
	    domMessage.innerHTML = '';  
		},
		//门诊
		busEmeMonthHosMore () {
 			// alert(this.month)
          var qs = require('qs');
          var self = this
          axios.post('/service', qs.stringify({"data": JSON.stringify({
              command: 'busEmeMonthHosMore',
              platform: 'web',
              monthTime: self.month,
              type: self.typeValue
             })}), {
              headers: {
               "BBG-Key": "ab9ef204-3253-49d4-b229-3cc2383480a6",
              }
             })
             .then(function (rep) {
              if (rep.data.statusCode === '10001') {
              	// alert(1)
              	self.optionsMenRightTop.xAxis[0].data = []
              	self.optionsMenRightTop.series[0].data = []
              	self.optionsMenRightTop.series[1].data = []
              	rep.data.data.busEmeMonthHos.thisMonth.monthTrend.xData.forEach((item) => {
              		self.optionsMenRightTop.xAxis[0].data.push(item)
              	})
              	rep.data.data.busEmeMonthHos.thisMonth.monthTrend.yData.forEach((item) => {
              		self.optionsMenRightTop.series[0].data.push(item)
              	})
              	rep.data.data.busEmeMonthHos.samePeriod.monthTrend.yData.forEach((item) => {
              		self.optionsMenRightTop.series[1].data.push(item)
              	})
              	// console.log(self.optionsMenRightTop)
              	self.myChart1 = echarts.init(self.$refs.menrighttop)
				self.myChart1.setOption(self.optionsMenRightTop)
              		
              	self.listH = rep.data.data.busEmeMonthHos.thisMonth.departmentTrend.xData.length * 50 + 'px'
              	// alert(self.listH)
              	self.options.yAxis[0].data = []
              	self.options.series[0].data = []
              	self.options.series[1].data = []
              	self.$nextTick(() => { 
              		rep.data.data.busEmeMonthHos.thisMonth.departmentTrend.xData.forEach((item) => {
	              		self.options.yAxis[0].data.push(item)
	              	})
	              	rep.data.data.busEmeMonthHos.thisMonth.departmentTrend.yData.forEach((item) => {
	              		// let objt = self.number(Number(5647654))
	              		// item = self.number(parseFloat((Number(item))).toFixed(2))
	              		self.options.series[0].data.push(item)
	              	})
	              	rep.data.data.busEmeMonthHos.samePeriod.departmentTrend.yData.forEach((item) => {
	              		self.options.series[1].data.push(item)
	              	})
	              	self.listHeight = (parseInt(self.options.yAxis[0].data.length)*70 + 60) + 'px'
	              	self.options.series[2].data = []
							for (var i = 0 ; i < self.options.yAxis[0].data.length; i++) {
								self.options.series[2].data.push(100)
							}
              		self.myChart = echarts.init(self.$refs.list)
              		setTimeout(() => self.myChart.resize(), 0)
					self.myChart.setOption(self.options)
					self.optionsMenRightTop.xAxis[0].data = []
	              	self.optionsMenRightTop.series[0].data = []
	              	self.optionsMenRightTop.series[1].data = []
	              	if(self.typeValue === 'medicalPeo') {
	              		self.menrighttop_title = '诊疗人次'
	              	} else if(self.typeValue === 'outpatientPeo') {
	              		self.menrighttop_title = '门诊人次'
	              	} else if(self.typeValue === 'emergencyPeo') {
	              		self.menrighttop_title = '急诊人次'
	              	}
	              	rep.data.data.busEmeMonthHos.thisMonth.monthTrend.xData.forEach((item) => {
	              		self.optionsMenRightTop.xAxis[0].data.push(item)
	              	})
	              	rep.data.data.busEmeMonthHos.thisMonth.monthTrend.yData.forEach((item) => {
	              		self.optionsMenRightTop.series[0].data.push(item)
	              	})
	              	rep.data.data.busEmeMonthHos.samePeriod.monthTrend.yData.forEach((item) => {
	              		self.optionsMenRightTop.series[1].data.push(item)
	              	})
	              	// console.log(self.optionsMenRightTop)
	              	self.myChart1 = echarts.init(self.$refs.menrighttop)
					self.myChart1.setOption(self.optionsMenRightTop)

              	})
              	var info = rep.data.data.busEmeMonthHos.thisMonth.info
              	self.cuInfusionPeo = self.numberInt(info.cuInfusionPeo)
              	self.cuLeftPeo = self.numberInt(info.cuLeftPeo)
              	self.cuSavePeo = self.numberInt(info.cuSavePeo)
              	self.emeInfusionPeo = self.numberInt(info.emeInfusionPeo)
              	self.emeLeftPeo = self.numberInt(info.emeLeftPeo)
              	self.emeRescuePeo = self.numberInt(info.emeRescuePeo)
              	self.emergencyPeoThisMonth = self.numberInt(info.emergencyPeo)
              	self.medicalPeoThisMonth = self.numberInt(info.medicalPeo)
              	self.outpatientPeoThisMonth = self.numberInt(info.outpatientPeo)
              	var same = rep.data.data.busEmeMonthHos.samePeriod
              	self.medicalPeoSamePeriod = self.numberInt(same.medicalPeo)
              	self.emergencyPeoSamePeriod = self.numberInt(same.emergencyPeo)
              	self.outpatientSamePeriod = self.numberInt(same.outpatientPeo)
              	self.options_depIds = rep.data.data.busEmeMonthHos.thisMonth.departmentTrend.depIds
              } else if (rep.data.statusCode === '10003'){
              	 	
              	 	self.$router.push('/login')
              	}
             }).catch(function (error) {
              // console.log(error);
             })
 		},
 		//住院
 		busHosMonthHosMore () {
 			// alert(this.month)
          var qs = require('qs');
          var self = this
          axios.post('/service', qs.stringify({"data": JSON.stringify({
              command: 'busHosMonthHosMore',
              platform: 'web',
              monthTime: self.month,
              type: self.typeValue
             })}), {
              headers: {
               "BBG-Key": "ab9ef204-3253-49d4-b229-3cc2383480a6",
              }
             })
             .then(function (rep) {
              if (rep.data.statusCode === '10001') {
              	var hosMonth = rep.data.data.busHosMonthHos.thisMonth.info
              	// alert(hosMonth)
              	var hosSame = rep.data.data.busHosMonthHos.samePeriod
              	
              	//科室数据图表
              	self.options.yAxis[0].data = []
              	self.options.series[0].data = []
              	self.options.series[1].data = []
              	rep.data.data.busHosMonthHos.thisMonth.departmentTrend.xData.forEach((item) => {
              		self.options.yAxis[0].data.push(item)
              	})
              	if(self.typeValue === 'bedRate') {
              		rep.data.data.busHosMonthHos.thisMonth.departmentTrend.yData.forEach((item) => {
              			item = parseFloat(item)
	              		self.options.series[0].label.formatter = function (item) {
	              			return item.value.toString().replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g,'$&,') + '%'
	              		}
	              		self.options.series[0].data.push(item)
	              	})
	              	rep.data.data.busHosMonthHos.samePeriod.departmentTrend.yData.forEach((item) => {
	              		item = parseFloat(item)
	              		self.options.series[1].label.formatter = function (item) {
	              			return item.value.toString().replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g,'$&,') + '%'
	              		}
	              		self.options.series[1].data.push(item)
	              	})
              	} else {
	              	rep.data.data.busHosMonthHos.thisMonth.departmentTrend.yData.forEach((item) => {
	              		self.options.series[0].label.formatter = function (item) {
	              			return item.value.toString().replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g,'$&,')
	              		}
	              		self.options.series[0].data.push(item)
	              	})
	              	rep.data.data.busHosMonthHos.samePeriod.departmentTrend.yData.forEach((item) => {
	              		self.options.series[1].label.formatter = function (item) {
	              			return item.value.toString().replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g,'$&,')
	              		}
	              		self.options.series[1].data.push(item)
	              	})	
              	}
              	

              	self.options_depIds = rep.data.data.busHosMonthHos.thisMonth.departmentTrend.depIds
              	// console.log(self.options_depIds)
              	self.listHeight = parseInt(self.options.yAxis[0].data.length)*70 + 'px'
              	self.options.series[2].data = []
				for (var i = 0 ; i < self.options.yAxis[0].data.length; i++) {
					self.options.series[2].data.push(100)
				}
              	self.myChart = echarts.init(self.$refs.list)
              	setTimeout(() => self.myChart.resize(), 0)
				self.myChart.setOption(self.options)

              	self.outpatientPeoThisMonth = hosMonth.aveHosDay //平均住院日本月
					      self.medicalPeoThisMonth = self.numberInt(hosMonth.outTotalPeo) //出院总人数本月
					      self.emergencyPeoThisMonth = hosMonth.bedRate //病床使用率本月
					      self.outpatientSamePeriod = self.number(Number(hosSame.aveHosDay)) //平均住院日同期
					      self.medicalPeoSamePeriod = self.numberInt(hosSame.outTotalPeo) //出院总人数同期
					      self.emergencyPeoSamePeriod = hosSame.bedRate //病床使用率同期
					      self.bedAmount = self.numberInt(hosMonth.bedAmount) //编制床位数
								self.bedFact = self.numberInt(hosMonth.bedFact) //实际开放数
								self.bedOcc = self.numberInt(hosMonth.bedOcc) //实际占用数
								self.bedOut = self.numberInt(hosMonth.bedOut) //出院者占用数	
								self.bedTranTimes = self.numberInt(hosMonth.bedTranTimes) //平均病床周转次数
								self.bedWorkDay = hosMonth.bedWorkDay //平均病床工作日
								self.endLeftPeo = self.numberInt(hosMonth.endLeftPeo) //期末留院人数
								self.endMonPeo = self.numberInt(hosMonth.endMonPeo) //上期末人数
								self.inPeo = self.numberInt(hosMonth.inPeo) //入院人数
								self.intoPeo = self.numberInt(hosMonth.intoPeo) //他科转入人数
								self.outInBaby = self.numberInt(hosMonth.outInBaby) //新生儿
								self.outPeo = self.numberInt(hosMonth.outPeo) //出院人数
								self.outSickPeo = self.numberInt(hosMonth.outSickPeo) //出院病人数
								self.tranOutPeo = self.numberInt(hosMonth.tranOutPeo)//转入他科


								//出院病人数图表
								self.optionsZhuchu.series[0].data[0].value = hosMonth.outInCure //治愈人数
								self.optionsZhuchu.series[0].data[1].value = hosMonth.outInBegood //好转人数
								self.optionsZhuchu.series[0].data[2].value =hosMonth.outInNocure //未愈人数
								self.optionsZhuchu.series[0].data[3].value = hosMonth.outInDie //死亡人数

								self.myChart4 = echarts.init(self.$refs.zhuchu)
								self.myChart4.setOption(self.optionsZhuchu)

								//住院来源
								self.optionsZhuzhen.series[0].data[0].value = hosMonth.hosEmePeo //急诊住院人数
								self.hosEmePeo = self.numberInt(hosMonth.hosEmePeo)
								self.hosNorPeo = self.numberInt(hosMonth.hosNorPeo)
								self.optionsZhuzhen.series[0].data[1].value  = hosMonth.hosNorPeo //普通住院人数
								// alert(hosMonth.hosEmePeo)
								self.myChart5 = echarts.init(self.$refs.zhuzhen)
								self.myChart5.setOption(self.optionsZhuzhen)

              } else if (rep.data.statusCode === '10003'){
              	 self.$router.push('/login')
              }
             }).catch(function (error) {
              // console.log(error);
             })
 		},
 		//手术
 		busSurMonthHosMore () {
 			// alert(this.month)
          var qs = require('qs');
          var self = this
          axios.post('/service', qs.stringify({"data": JSON.stringify({
              command: 'busSurMonthHosMore',
              platform: 'web',
              monthTime: self.month,
              type: self.typeValue
             })}), {
              headers: {
               "BBG-Key": "ab9ef204-3253-49d4-b229-3cc2383480a6",
              }
             })
             .then(function (rep) {
              if (rep.data.statusCode === '10001') {

              	//手术趋势
              	self.optionsshoushutop.xAxis[0].data = []
              	self.optionsshoushutop.series[0].data = []
              	self.optionsshoushutop.series[1].data = []
              	// console.log(rep.data.data.busSurMonthHos.thisMonth.monthTrend.yData)
              	rep.data.data.busSurMonthHos.thisMonth.monthTrend.xData.forEach((item) => {
              		self.optionsshoushutop.xAxis[0].data.push(item)
              	})
              	rep.data.data.busSurMonthHos.thisMonth.monthTrend.yData.forEach((item) => {
              		self.optionsshoushutop.series[0].data.push(item)
              	})
              	rep.data.data.busSurMonthHos.samePeriod.monthTrend.yData.forEach((item) => {
              		self.optionsshoushutop.series[1].data.push(item)
              	})
              	console.log(self.optionsshoushutop)
              	self.myChart9 = echarts.init(self.$refs.shoushutop)
				self.myChart9.setOption(self.optionsshoushutop)
				
				//手术特征
				self.optionsMenzhenshoushutezheng.xAxis[0].data = []
              	self.optionsMenzhenshoushutezheng.series[0].data = []
              	// console.log(rep.data.data.busSurMonthHos.thisMonth.monthTrend.yData)
              	rep.data.data.busSurMonthHos.thisMonth.surFea.xData.forEach((item) => {
              		self.optionsMenzhenshoushutezheng.xAxis[0].data.push(item)
              	})
              	rep.data.data.busSurMonthHos.thisMonth.surFea.yData.forEach((item) => {
              		self.optionsMenzhenshoushutezheng.series[0].data.push(item)
              	})
              	self.myChart20 = echarts.init(self.$refs.menzhenshoushutezheng)
				self.myChart20.setOption(self.optionsMenzhenshoushutezheng)
				self.$nextTick(() => { 
	              	if(self.typeValue === 'surgeryNum') {
	              		self.shoushutop_title = '手术量趋势'
	              	} else if(self.typeValue === 'surgeryHos') {
	              		self.shoushutop_title = '住院手术量趋势'
	              	} else if(self.typeValue === 'surgeryEme') {
	              		self.shoushutop_title = '门诊手术量趋势'
	              	}

              	})
              	self.options.yAxis[0].data = []
              	self.options.series[0].data = []
              	self.options.series[1].data = []
              	rep.data.data.busSurMonthHos.thisMonth.departmentTrend.xData.forEach((item) => {
              		self.options.yAxis[0].data.push(item)
              	})
              	rep.data.data.busSurMonthHos.thisMonth.departmentTrend.yData.forEach((item) => {
              		self.options.series[0].data.push(item)
              	})
              	rep.data.data.busSurMonthHos.samePeriod.departmentTrend.yData.forEach((item) => {
              		self.options.series[1].data.push(item)
              	})
              	self.options_depIds = rep.data.data.busSurMonthHos.thisMonth.departmentTrend.depIds
              	self.listHeight = parseInt(self.options.yAxis[0].data.length)*70 + 'px'
              	self.options.series[2].data = []
							for (var i = 0 ; i < self.options.yAxis[0].data.length; i++) {
								self.options.series[2].data.push(100)
							}
              	self.myChart = echarts.init(self.$refs.list)
              	setTimeout(() => self.myChart.resize(), 0)
								self.myChart.setOption(self.options)
 								var surThisMonth = rep.data.data.busSurMonthHos.thisMonth.info
 								var surSamePeriod = rep.data.data.busSurMonthHos.samePeriod
 								self.outpatientPeoThisMonth = self.numberInt(surThisMonth.surgeryHos)
					      self.medicalPeoThisMonth = self.numberInt(surThisMonth.surgeryNum)
					      self.emergencyPeoThisMonth = self.numberInt(surThisMonth.surgeryEme)
					      self.outpatientSamePeriod = self.numberInt(surSamePeriod.surgeryHos)
					      self.medicalPeoSamePeriod = self.numberInt(surSamePeriod.surgeryNum) 
					      self.emergencyPeoSamePeriod = self.numberInt(surSamePeriod.surgeryEme) 


					      
					      //门诊手术类型图表
					      self.optionsMenzhenshoushuleixing.series[0].data[1].value = surThisMonth.hosANum //甲级住院
						self.optionsMenzhenshoushuleixing.series[0].data[2].value = surThisMonth.hosBNum //乙级住院
						self.optionsMenzhenshoushuleixing.series[0].data[3].value = surThisMonth.hosCNum //丙级住院
						self.optionsMenzhenshoushuleixing.series[0].data[4].value = surThisMonth.hosDNum //丁级住院
						self.optionsMenzhenshoushuleixing.series[0].data[5].value = surThisMonth.hosENum //戊级住院
						self.optionsMenzhenshoushuleixing.series[0].data[6].value = surThisMonth.hosFNum //己级住院
						self.optionsMenzhenshoushuleixing.series[0].data[7].value = surThisMonth.hosGNum//庚级住院
						console.log(surThisMonth.hosGNum)
						// self.optionsMenzhenshoushuleixing.series[0].data[8].value = surThisMonth.hosGNum//己级住院
						self.optionsMenzhenshoushuleixing.series[0].data[0].value = surThisMonth.hosSNum //特级住院
									self.myChart20 = echarts.init(self.$refs.menzhenshoushuleixing)
									self.myChart20.setOption(self.optionsMenzhenshoushuleixing)

              } else if (rep.data.statusCode === '10003'){
              	 self.$router.push('/login')
              }
             }).catch(function (error) {
              // console.log(error);
             })
 		},
 		//药品
 		busMedMonthHosMore () {
 			// alert(this.month)
          var qs = require('qs');
          var self = this
          axios.post('/service', qs.stringify({"data": JSON.stringify({
              command: 'busMedMonthHosMore',
              platform: 'web',
              monthTime: self.month,
              type: self.typeValue
             })}), {
              headers: {
               "BBG-Key": "ab9ef204-3253-49d4-b229-3cc2383480a6",
              }
             })
             .then(function (rep) {
              if (rep.data.statusCode === '10001') {
              	
              	self.options.yAxis[0].data = []
              	self.options.series[0].data = []
              	self.options.series[1].data = []
              	rep.data.data.busMedMonthHos.thisMonth.departmentTrend.xData.forEach((item) => {
              		self.options.yAxis[0].data.push(item)
              	})

              	rep.data.data.busMedMonthHos.thisMonth.departmentTrend.yData.forEach((item) => {
              		self.options.series[0].data.push(item)
              	})
              	rep.data.data.busMedMonthHos.samePeriod.departmentTrend.yData.forEach((item) => {
              		self.options.series[1].data.push(item)
              	})
              	self.options_depIds = rep.data.data.busMedMonthHos.thisMonth.departmentTrend.depIds
              	self.listHeight = parseInt(self.options.yAxis[0].data.length)*70 + 'px'
              	self.options.series[2].data = []
							for (var i = 0 ; i < self.options.yAxis[0].data.length; i++) {
								self.options.series[2].data.push(100)
							}
              	self.myChart = echarts.init(self.$refs.list)
              	setTimeout(() => self.myChart.resize(), 0)
					self.myChart.setOption(self.options)
					//药品总额趋势
              	if(self.typeValue === 'medIncomeTotal') {
              		self.medicinetop_title = '用药总额'
              	} else if(self.typeValue === 'medMemNum') {
              		self.medicinetop_title = '门急诊用药总额'
              	} else if(self.typeValue === 'medHosNum') {
              		self.medicinetop_title = '住院用药总额'
              	}
              	if(self.typeValue === 'medIncomeTotal') {
              		self.optionsMedicinetop.xAxis[0].data = []
	              	self.optionsMedicinetop.series[0].data = []
	              	self.optionsMedicinetop.series[1].data = []
	              	self.optionsMedicinetop.series[2].data = []
	              	self.optionsMedicinetop.series[3].data = []
	              	self.optionsMedicinetop.legend.data = [
		        	
		        	{
		        		icon: 'circle',
		        		name: '本月住院'
		        	},{
		        		icon: 'circle',
		        		name: '本月门急诊'
		        	},
		        	{
		        		icon: 'circle',
		        		name: '同期住院'
		        	},
		        	{
		        		icon: 'circle',
		        		name: '同期门急诊'
		        	},
		        	
		        	
		        ]
		        self.optionsMedicinetop.xAxis[0].data = []
		        	let monthLength = rep.data.data.busMedMonthHos.thisMonth.monthTrend.xData.length
		        	let samePeriodLength = rep.data.data.busMedMonthHos.samePeriod.monthTrend.xData.length
		        	if(monthLength > samePeriodLength) {
			        	rep.data.data.busMedMonthHos.thisMonth.monthTrend.xData.forEach((item) => {
		              		self.optionsMedicinetop.xAxis[0].data.push(item)
		              	})	
		        	} else {
		        		rep.data.data.busMedMonthHos.samePeriod.monthTrend.xData.forEach((item) => {
		              		self.optionsMedicinetop.xAxis[0].data.push(item)
		              	})	
		        	}
		        	// rep.data.data.busMedMonthHos.thisMonth.monthTrend.xData.forEach((item) => {
	          //     		self.optionsMedicinetop.xAxis[0].data.push(item)
	          //     	})
	              	rep.data.data.busMedMonthHos.thisMonth.monthTrend.yMedHosNum.forEach((item) => {
	              		self.optionsMedicinetop.series[0].data.push(item)
	              	})
	              	
	              	rep.data.data.busMedMonthHos.thisMonth.monthTrend.yMedMemNum.forEach((item) => {
	              		self.optionsMedicinetop.series[1].data.push(item)
	              	})
	              	rep.data.data.busMedMonthHos.samePeriod.monthTrend.yMedMemNum.forEach((item) => {
	              		self.optionsMedicinetop.series[2].data.push(item)
	              	})
	              	rep.data.data.busMedMonthHos.samePeriod.monthTrend.yMedHosNum.forEach((item) => {
	              		self.optionsMedicinetop.series[3].data.push(item)
	              	})
	              	self.myChart6 = echarts.init(self.$refs.medicinetop)
					self.myChart6.setOption(self.optionsMedicinetop)
              	} else if(self.typeValue === 'medHosNum') {
              		self.optionsMedicinetop.xAxis[0].data = []
	              	self.optionsMedicinetop.series[0].data = []
	              	self.optionsMedicinetop.series[1].data = []
	              	self.optionsMedicinetop.series[2].data = []
	              	self.optionsMedicinetop.series[3].data = []
	              	self.optionsMedicinetop.legend.data = [
	              	{
		        		icon: 'circle',
		        		name: '本月住院'
		        	},
		        	{
		        		icon: 'circle',
		        		name: '同期住院'
		        	}]
	              	// rep.data.data.busMedMonthHos.thisMonth.monthTrend.xData.forEach((item) => {
	              	// 	self.optionsMedicinetop.xAxis[0].data.push(item)
	              	// })
	              	let monthLength = rep.data.data.busMedMonthHos.thisMonth.monthTrend.xData.length
		        	let samePeriodLength = rep.data.data.busMedMonthHos.samePeriod.monthTrend.xData.length
		        	if(monthLength > samePeriodLength) {
			        	rep.data.data.busMedMonthHos.thisMonth.monthTrend.xData.forEach((item) => {
		              		self.optionsMedicinetop.xAxis[0].data.push(item)
		              	})	
		        	} else {
		        		rep.data.data.busMedMonthHos.samePeriod.monthTrend.xData.forEach((item) => {
		              		self.optionsMedicinetop.xAxis[0].data.push(item)
		              	})	
		        	}
	              	rep.data.data.busMedMonthHos.thisMonth.monthTrend.yMedHosNum.forEach((item) => {
	              		self.optionsMedicinetop.series[0].data.push(item)
	              	})
	              	
	              	rep.data.data.busMedMonthHos.samePeriod.monthTrend.yMedHosNum.forEach((item) => {
	              		self.optionsMedicinetop.series[2].data.push(item)
	              	})
	              	self.myChart6 = echarts.init(self.$refs.medicinetop)
	              	self.myChart6.clear()
					self.myChart6.setOption(self.optionsMedicinetop)
              	} else {
              		self.optionsMedicinetop.xAxis[0].data = []
	              	self.optionsMedicinetop.series[0].data = []
	              	self.optionsMedicinetop.series[1].data = []
	              	self.optionsMedicinetop.series[2].data = []
	              	self.optionsMedicinetop.series[3].data = []
	              	self.optionsMedicinetop.legend.data = [
	              	{
		        		icon: 'circle',
		        		name: '本月门急诊'
		        	},
		        	{
		        		icon: 'circle',
		        		name: '同期门急诊'
		        	}]
	              	// rep.data.data.busMedMonthHos.thisMonth.monthTrend.xData.forEach((item) => {
	              	// 	self.optionsMedicinetop.xAxis[0].data.push(item)
	              	// })
	              	let monthLength = rep.data.data.busMedMonthHos.thisMonth.monthTrend.xData.length
		        	let samePeriodLength = rep.data.data.busMedMonthHos.samePeriod.monthTrend.xData.length
		        	if(monthLength > samePeriodLength) {
			        	rep.data.data.busMedMonthHos.thisMonth.monthTrend.xData.forEach((item) => {
		              		self.optionsMedicinetop.xAxis[0].data.push(item)
		              	})	
		        	} else {
		        		rep.data.data.busMedMonthHos.samePeriod.monthTrend.xData.forEach((item) => {
		              		self.optionsMedicinetop.xAxis[0].data.push(item)
		              	})	
		        	}
	              	rep.data.data.busMedMonthHos.thisMonth.monthTrend.yMedMemNum.forEach((item) => {
	              		self.optionsMedicinetop.series[1].data.push(item)
	              	})
	              	
	              	rep.data.data.busMedMonthHos.samePeriod.monthTrend.yMedMemNum.forEach((item) => {
	              		self.optionsMedicinetop.series[3].data.push(item)
	              	})
	              	self.myChart6 = echarts.init(self.$refs.medicinetop)
	              	self.myChart6.clear()
					self.myChart6.setOption(self.optionsMedicinetop)
              	}
              	
              	//end
						var surThisMonth = rep.data.data.busMedMonthHos.thisMonth.info
						var surSamePeriod = rep.data.data.busMedMonthHos.samePeriod
		    		self.outpatientPeoThisMonth = self.number(Number(surThisMonth.medHosNum))  
		      self.medicalPeoThisMonth = self.number(Number(surThisMonth.medIncomeTotal))
					      self.emergencyPeoThisMonth = self.number(Number(surThisMonth.medMemNum)) 
					      self.outpatientSamePeriod = self.number(Number(surSamePeriod.medHosNum)) 
					      self.medicalPeoSamePeriod = self.number(Number(surSamePeriod.medIncomeTotal)) 
					      self.emergencyPeoSamePeriod = self.number(Number(surSamePeriod.medMemNum)) 
					      self.medRate = surThisMonth.medRate //用药占比
								self.monthTime = surThisMonth.monthTime //（评估时间）

								//用药占比图表

								self.optionsMenRightBottom.series[0].data[0].value = parseFloat(self.medRate).toFixed(2)
								self.myChart2 = echarts.init(self.$refs.menrightbottom)
								self.myChart2.setOption(self.optionsMenRightBottom)

								//药品种占比
								self.medWestIncome = self.number(Number(surThisMonth.medWestIncome)) //西药总额
								self.medDrinkIncome = self.number(Number(surThisMonth.medDrinkIncome)) //中药饮片总额
								self.medMidIncome = self.number(Number(surThisMonth.medMidIncome)) //中成药总额
								self.optionsyaopinzhong.series[0].data[0].value = surThisMonth.medWestIncome
								self.optionsyaopinzhong.series[0].data[1].value = surThisMonth.medMidIncome
								self.optionsyaopinzhong.series[0].data[2].value = surThisMonth.medDrinkIncome
								self.myChart8 = echarts.init(self.$refs.yaopinzhong)
								self.myChart8.setOption(self.optionsyaopinzhong)

              } else if (rep.data.statusCode === '10003'){
              	 self.$router.push('/login')
              }
             }).catch(function (error) {
              // console.log(error);
             })
 		},
 		//耗材
 		busConMonthHosMore () {
 			// alert(this.month)
          var qs = require('qs');
          var self = this
          axios.post('/service', qs.stringify({"data": JSON.stringify({
              command: 'busConMonthHosMore',
              platform: 'web',
              monthTime: self.month,
              type: self.typeValue
             })}), {
              headers: {
               "BBG-Key": "ab9ef204-3253-49d4-b229-3cc2383480a6",
              }
             })
             .then(function (rep) {
              if (rep.data.statusCode === '10001') {

              	//耗材总额趋势
              	if(self.typeValue === 'conTotal') {
              		self.haocaitop_title = '耗材总额'
              	} else if(self.typeValue === 'conHosNum') {
              		self.haocaitop_title = '住院耗材总额'
              	} else if(self.typeValue === 'conEmeNum') {
              		self.haocaitop_title = '门急诊耗材总额'
              	}
              	self.optionshaocaitop.xAxis[0].data = []
              	self.optionshaocaitop.series[0].data = []
              	self.optionshaocaitop.series[1].data = []
              	rep.data.data.busConMonthHos.thisMonth.monthTrend.xData.forEach((item) => {
              		self.optionshaocaitop.xAxis[0].data.push(item)
              	})
              	rep.data.data.busConMonthHos.thisMonth.monthTrend.yData.forEach((item) => {
              		self.optionshaocaitop.series[0].data.push(item)
              	})
              	rep.data.data.busConMonthHos.samePeriod.monthTrend.yData.forEach((item) => {
              		self.optionshaocaitop.series[1].data.push(item)
              	})
              	self.myChart13 = echarts.init(self.$refs.haocaitop)
								self.myChart13.setOption(self.optionshaocaitop)

              	self.options.yAxis[0].data = []
              	self.options.series[0].data = []
              	self.options.series[1].data = []
              	rep.data.data.busConMonthHos.thisMonth.departmentTrend.xData.forEach((item) => {
              		self.options.yAxis[0].data.push(item)
              	})
              	rep.data.data.busConMonthHos.thisMonth.departmentTrend.yData.forEach((item) => {
              		self.options.series[0].data.push(item)
              	})
              	rep.data.data.busConMonthHos.samePeriod.departmentTrend.yData.forEach((item) => {
              		self.options.series[1].data.push(item)
              	})
              	self.options_depIds = rep.data.data.busConMonthHos.thisMonth.departmentTrend.depIds
              	self.listHeight = parseInt(self.options.yAxis[0].data.length)*70 + 'px'
              	self.options.series[2].data = []
							for (var i = 0 ; i < self.options.yAxis[0].data.length; i++) {
								self.options.series[2].data.push(100)
							}
              	self.myChart = echarts.init(self.$refs.list)
              	setTimeout(() => self.myChart.resize(), 0)
								self.myChart.setOption(self.options)
 								var surThisMonth = rep.data.data.busConMonthHos.thisMonth.info
					      self.medicalPeoThisMonth = self.number(Number(surThisMonth.conTotal)) //护理相关耗材总额
					      self.outpatientPeoThisMonth = self.number(Number(surThisMonth.conHosNum)) //住院耗材总额
					      self.emergencyPeoThisMonth = self.number(Number(surThisMonth.conEmeNum)) //门诊耗材总额
					      self.medicalPeoSamePeriod = surThisMonth.conTotalRate  //耗材占比
					      self.outpatientSamePeriod = surThisMonth.conHosRate //住院耗材占比
					      self.emergencyPeoSamePeriod = surThisMonth.conEmeRate //门诊耗材占比

					      //耗材开销分类图表
					      self.conTimeNum = self.number(Number(surThisMonth.conTimeNum)) //计费耗材总额
					      self.conNotimeNum = self.number(Number(surThisMonth.conNotimeNum)) //非计费耗材总额

					      self.optionshaocaimenji.series[0].data[0].value = surThisMonth.conTimeNum
					      self.optionshaocaimenji.series[0].data[1].value = surThisMonth.conNotimeNum
					      self.myChart11 = echarts.init(self.$refs.haocaimenji)
								self.myChart11.setOption(self.optionshaocaimenji)

					      //耗材用途分类图表
					      self.conNurNum = self.number(Number(surThisMonth.conNurNum)) //护理相关耗材总额
								self.conDocNum = self.number(Number(surThisMonth.conDocNum)) //医生相关耗材总额
								self.optionshaocaileibie.series[0].data[0].value = surThisMonth.conNurNum
								self.optionshaocaileibie.series[0].data[1].value = surThisMonth.conDocNum
								self.myChart12 = echarts.init(self.$refs.haocaileibie)
								self.myChart12.setOption(self.optionshaocaileibie)
              } else if (rep.data.statusCode === '10003'){
              	 
              	 self.$router.push('/login')
              }
             }).catch(function (error) {
              // console.log(error);
             })
 		},
 		//扣罚
 		busPenMonthHosMore () {
 			// alert(this.month)
          var qs = require('qs');
          var self = this
          axios.post('/service', qs.stringify({"data": JSON.stringify({
              command: 'busPenMonthHosMore',
              platform: 'web',
              monthTime: self.month,
              type: self.typeValue
             })}), {
              headers: {
               "BBG-Key": "ab9ef204-3253-49d4-b229-3cc2383480a6",
              }
             })
             .then(function (rep) {
              if (rep.data.statusCode === '10001') {
              	if(self.typeValue === 'penTotal') {
              		self.koufazongequshi_title = '扣罚总额趋势'
              	} else if(self.typeValue === 'safePen') {
              		self.koufazongequshi_title = '安全部扣罚'
              	} else if(self.typeValue === 'refusePay') {
              		self.koufazongequshi_title = '医保拒付'
              	} else if(self.typeValue === 'otherPay') {
              		self.koufazongequshi_title = '其他扣罚'
              	}
              	//扣罚趋势图表
              	self.optionsKoufazongequshi.xAxis[0].data = []
              	self.optionsKoufazongequshi.series[0].data = []
              	self.optionsKoufazongequshi.series[1].data = []
              	rep.data.data.busPenMonthHos.thisMonth.monthTrend.xData.forEach((item) => {
              		self.optionsKoufazongequshi.xAxis[0].data.push(item)
              	})
              	rep.data.data.busPenMonthHos.thisMonth.monthTrend.yData.forEach((item) => {
              		self.optionsKoufazongequshi.series[0].data.push(item)
              	})
              	rep.data.data.busPenMonthHos.samePeriod.monthTrend.yData.forEach((item) => {
              		self.optionsKoufazongequshi.series[1].data.push(item)
              	})
              	self.myChart91 = echarts.init(self.$refs.koufazongequshi)
								self.myChart91.setOption(self.optionsKoufazongequshi)

              	self.options.yAxis[0].data = []
              	self.options.series[0].data = []
              	self.options.series[1].data = []
              	rep.data.data.busPenMonthHos.thisMonth.departmentTrend.xData.forEach((item) => {
              		self.options.yAxis[0].data.push(item)
              	})
              	
              	rep.data.data.busPenMonthHos.thisMonth.departmentTrend.yData.forEach((item) => {
              		self.options.series[0].data.push(item)
              	})
              	rep.data.data.busPenMonthHos.samePeriod.departmentTrend.yData.forEach((item) => {
              		self.options.series[1].data.push(item)
              	})
              	self.options_depIds = rep.data.data.busPenMonthHos.thisMonth.departmentTrend.depIds
              	self.listHeight = parseInt(self.options.yAxis[0].data.length)*70 + 'px'
              	self.options.series[2].data = []
							for (var i = 0 ; i < self.options.yAxis[0].data.length; i++) {
								self.options.series[2].data.push(100)
							}
              	self.myChart = echarts.init(self.$refs.list)
              	setTimeout(() => self.myChart.resize(), 0)
              	console.log(self.options)
				self.myChart.setOption(self.options)
					var surThisMonth = rep.data.data.busPenMonthHos.thisMonth.info
					self.otherPay = self.number(Number(surThisMonth.otherPay)) //其他扣罚总额
				self.penTotal = self.number(Number(surThisMonth.penTotal)) //扣罚总额
				self.refusePay = self.number(Number(surThisMonth.refusePay)) //医保拒付扣罚总额
				self.safePen = self.number(Number(surThisMonth.safePen)) //医疗安全扣罚总额

	      		//图表
	      		self.refuseChePay = self.number(Number(surThisMonth.refuseChePay)) //检查治疗费
				self.refuseMatPay = self.number(Number(surThisMonth.refuseMatPay)) //材料费
				self.refuseMedPay = self.number(Number(surThisMonth.refuseMedPay)) //药品费
				self.otherExpPay = self.number(Number(surThisMonth.otherExpPay)) //专家诊迟诊费
				self.otherNormalPay = self.number(Number(surThisMonth.otherNormalPay)) //普通诊迟诊费
				self.safeEmePay = self.number(Number(surThisMonth.safeEmePay)) //扣科室绩效
				self.safeHosPay = self.number(Number(surThisMonth.safeHosPay)) //扣个人绩效

				self.optionsAnquanbukoufa.series[0].data[0].value = surThisMonth.safeEmePay
				self.optionsAnquanbukoufa.series[0].data[1].value = surThisMonth.safeHosPay
				self.myChart111 = echarts.init(self.$refs.anquanbukoufa)
				self.myChart111.setOption(self.optionsAnquanbukoufa)

				self.optionsJufukoufa.series[0].data[0].value = surThisMonth.refuseMedPay
				self.optionsJufukoufa.series[0].data[1].value = surThisMonth.refuseMatPay
				self.optionsJufukoufa.series[0].data[2].value = surThisMonth.refuseChePay
				self.myChart112 = echarts.init(self.$refs.jufukoufa)
				self.myChart112.setOption(self.optionsJufukoufa)
				self.optionsQitakoufa.series[0].data[0].value = surThisMonth.otherExpPay
				self.optionsQitakoufa.series[0].data[1].value = surThisMonth.otherNormalPay
				self.myChart113 = echarts.init(self.$refs.qitakoufa)
				self.myChart113.setOption(self.optionsQitakoufa)
              } else if (rep.data.statusCode === '10003'){
              	 
              	 self.$router.push('/login')
              }
             }).catch(function (error) {
              // console.log(error);
             })
 		}
 		// busPenMonthHosMore () {
 		// 	console.log(this.typeValue) 		
 		// }
	},
	computed:{
		bgColor () {
			// const bgColor = ['active', 'active1', 'active2', 'active3', 'active4']
			// var bg;
			let bg = {}
			var bgColor = ''

			this.type === '门急诊情况'? bgColor = 'active' : this.type === '住院情况'? bgColor = 'active1' : this.type === '手术情况' ? bgColor = 'active2' : this.type === '药品使用情况' ? bgColor = 'active3' : this.type === '扣罚情况' ? bgColor = 'active4' : bgColor = 'active5'

			bg[bgColor] = true
			return bg
		}
	},
	mounted () {
		if (this.type === '门急诊情况') {
			this.options.series[0].itemStyle.normal.color = '#77B3DD'
			this.options.series[0].emphasis.itemStyle.color = '#2086CB'
			this.myChart = echarts.init(this.$refs.list)
			this.myChart.setOption(this.options)
			
		} else if (this.type === '住院情况') {
			this.options.series[0].emphasis.itemStyle.color = '#65B345'
			this.options.series[0].itemStyle.normal.color = '#97D582'
			this.myChart = echarts.init(this.$refs.list)
			this.myChart.setOption(this.options)
		} else if (this.type === '手术情况') {
			this.options.series[0].itemStyle.normal.color = '#95B9E8'
			this.options.series[0].emphasis.itemStyle.color = '#6893E7'
			this.myChart = echarts.init(this.$refs.list)
			this.myChart.setOption(this.options)
		} else if (this.type === '药品使用情况') {
			this.options.series[0].itemStyle.normal.color = '#B0ABEA'
			this.options.series[0].emphasis.itemStyle.color = '#7179E5'
			this.myChart = echarts.init(this.$refs.list)
			this.myChart.setOption(this.options)
		} else if (this.type === '耗材使用情况'){
			this.options.series[0].itemStyle.normal.color = '#89CFD2'
			this.options.series[0].emphasis.itemStyle.color = '#49B6B9'
			this.myChart = echarts.init(this.$refs.list)
			this.myChart.setOption(this.options)
		} else if (this.type === '扣罚情况'){
			this.options.series[0].itemStyle.normal.color = '#BFDD8C'
			this.options.series[0].emphasis.itemStyle.color = '#88C43F'
			this.myChart = echarts.init(this.$refs.list)
			this.myChart.setOption(this.options)
		}
		this.myChart = echarts.init(this.$refs.list)
		this.myChart.setOption(this.options)
		this.myChart30 = echarts.init(this.$refs.menzhenshoushutezheng)
		this.myChart30.setOption(this.optionsMenzhenshoushutezheng)
		var that = this
		//bar的鼠标事件
		// this.myChart.on("mouseover", setTimeout(function (params) {
		// 	that.myChart.dispatchAction({
  //           	type: 'highlight',
  //           	// seriesIndex: params.seriesIndex,
  //           	dataIndex: params.dataIndex
  //         	})
  //         	that.myChart.dispatchAction({
  //           	type: 'showTip',
  //           	seriesIndex: params.seriesIndex,
  //           	dataIndex: params.dataIndex,
  //           	// name: 'test'
  //         	})
		// }),100)
		// this.myChart.on("mouseover", function (params) {
				
  //         	that.myChart.dispatchAction({
  //           	type: 'showTip',
  //           	// seriesIndex: 0,
  //           	dataIndex: params.dataIndex,
  //           	// name: 'test'
  //         	})
          	
		// 	that.myChart.dispatchAction({
  //       	type: 'highlight',
  //       	// seriesIndex: params.seriesIndex,
  //       	dataIndex: params.dataIndex
  //         	})
  //         	// that.options.tooltip.formatter = function () {
  //         	// 	return "test"
  //         	// }
  //         	// that.myChart.setOption(that.options)
			
		// })
		// this.myChart.on("mouseout", function (params) {
		// 	// alert(params.dataIndex)
		// 	that.myChart.dispatchAction({
  //           	type: 'highlight',
  //           	// seriesIndex: params.seriesIndex,
  //           	dataIndex: params.dataIndex
  //         	})
  //         	// that.myChart.dispatchAction({
  //          //  	type: 'showTip',
  //          //  	seriesIndex: params.seriesIndex,
  //          //  	dataIndex: params.dataIndex,
  //          //  	// name: 'test'
  //         	// })
		// })
		//bar的点击事件
		this.myChart.on("click", function (params) {
			var length = that.options.yAxis[0].data.length
			var qs = require('qs')
			// console.log(params)
				// let clickIndex = null
				// if (clickIndex !== params.dataIndex) {
		  //           that.myChart.dispatchAction({
		  //             	type: 'downplay',
		  //             	// seriesIndex: 1,
		  //             	dataIndex: clickIndex,
		  //           })
		  //       }
	   //        	that.myChart.dispatchAction({
	   //          	type: 'highlight',
	   //          	// seriesIndex: params.seriesIndex,
	   //          	dataIndex: params.dataIndex
	   //        	})
	   //        	clickIndex = params.dataIndex
	   var index = params.dataIndex;
	  		var myChart = echarts.init(that.$refs.list)
	  		var itemStyle = {
                normal:{
                    color : ''
                }
            }
            if (that.type === '门急诊情况') {
				itemStyle.normal.color = '#2086CB'
			} else if (that.type === '住院情况') {
				itemStyle.normal.color = '#65B345'
			} else if (that.type === '手术情况') {
				itemStyle.normal.color = '#6893E7'
			} else if (that.type === '药品使用情况') {
				itemStyle.normal.color = '#7179E5'
			} else if (that.type === '耗材使用情况'){
                itemStyle.normal.color = '#49B6B9'
			} else if (that.type === '扣罚情况'){
                itemStyle.normal.color = '#88C43F'
			}
	        
		  	for(var i = 0 ; i < that.options.yAxis[0].data.length ; i++){
	           	if(that.options.series[0].data[i].value){
	                that.options.series[0].data[i] = that.options.series[0].data[i].value;
	            }
	            if(that.options.series[1].data[i].value){
	                that.options.series[1].data[i] = that.options.series[1].data[i].value;
	            }
		        if(index == i){
		            that.options.series[0].data[i] = {
		                value : that.options.series[0].data[i],
		                itemStyle: itemStyle
		                
		                
		            }
		            that.options.series[1].data[i] = {
		                value : that.options.series[1].data[i],
		                itemStyle:{
		                    normal:{
		                        color : '#FBC83C'
		                    }
		                }
		            }
		        }
		    }	
	  		
	  		
	  	
	  		
		    myChart.setOption(that.options)
			if(that.type === '住院情况') {
				console.log(params.seriesIndex)
				
				// that.options.yAxis[0].data.forEach((item,index) => {
				// if (item == params.name) {
					var depId = that.options_depIds[params.dataIndex] + ''
					axios.post('/service', qs.stringify({"data": JSON.stringify({
		              command: 'busHosMonthDepLinkage',
		              platform: 'web',
		              monthTime: that.month,
		              depId: depId
		             })}), {
		              headers: {
		               "BBG-Key": "ab9ef204-3253-49d4-b229-3cc2383480a6",
		              }
		             })
		             .then(function (rep) {

		              if (rep.data.statusCode === '10001') {
		              	// console.log(rep.data.statusCode)
		              	var hosMonth = rep.data.data.busHosMonthDep.thisMonth.info
			    //           	that.outpatientPeoThisMonth = hosMonth.aveHosDay //平均住院日本月
							// that.medicalPeoThisMonth = hosMonth.outTotalPeo //出院总人数本月
							// that.emergencyPeoThisMonth = hosMonth.bedRate //病床使用率本月
							// that.outpatientSamePeriod = hosSame.aveHosDay //平均住院日同期
							// that.medicalPeoSamePeriod = hosSame.outTotalPeo //出院总人数同期
							// that.emergencyPeoSamePeriod = hosSame.bedRate //病床使用率同期							
							// that.bedAmount = hosMonth.bedAmount //编制床位数
							that.bedFact = hosMonth.bedFact //实际开放数
							that.bedOcc = hosMonth.bedOcc //实际占用数
							that.bedOut = hosMonth.bedOut //出院者占用数	
							that.bedTranTimes = hosMonth.bedTranTimes //平均病床周转次数
							that.bedWorkDay = hosMonth.bedWorkDay //平均病床工作日
							that.endLeftPeo = hosMonth.endLeftPeo //期末留院人数
							that.endMonPeo = hosMonth.endMonPeo //上期末人数
							
							that.inPeo = hosMonth.inPeo //入院人数
							that.intoPeo = hosMonth.intoPeo //他科转入人数
							that.outInBaby = hosMonth.outInBaby //新生儿
							that.outPeo = hosMonth.outPeo //出院人数
							that.outSickPeo = hosMonth.outSickPeo //出院病人数
							that.tranOutPeo = hosMonth.tranOutPeo//转入他科


							//出院病人数图表
							that.optionsZhuchu.series[0].data[0].value = hosMonth.outInCure //治愈人数
							that.optionsZhuchu.series[0].data[1].value = hosMonth.outInBegood //好转人数
							that.optionsZhuchu.series[0].data[2].value =hosMonth.outInNocure //未愈人数
							that.optionsZhuchu.series[0].data[3].value = hosMonth.outInDie //死亡人数

							that.myChart4 = echarts.init(that.$refs.zhuchu)
							that.myChart4.setOption(that.optionsZhuchu)

							//住院来源
							that.optionsZhuzhen.series[0].data[0].value = hosMonth.hosEmePeo //急诊住院人数
							that.hosEmePeo = hosMonth.hosEmePeo
							that.hosNorPeo = hosMonth.hosNorPeo
							that.optionsZhuzhen.series[0].data[1].value  = hosMonth.hosNorPeo //普通住院人数
							// alert(hosMonth.hosEmePeo)
							that.myChart5 = echarts.init(that.$refs.zhuzhen)
							that.myChart5.setOption(that.optionsZhuzhen)

		              }
		             }).catch(function (error) {
		              // console.log(error);
		             })
				// 	}
				// })
			}
			if (that.type === '门急诊情况') {
				
					// var testIndex = length - params.dataIndex -1
					// console.log(testIndex)
					var depId = that.options_depIds[params.dataIndex] + ''

					// console.log(length - params.dataIndex -1)
					// console.log(testIndex)
					axios.post('/service', qs.stringify({"data": JSON.stringify({
		              command: 'busEmeMonthDepLinkage',
		              platform: 'web',
		              monthTime: that.month,
		              depId: depId,
		              type: that.typeValue
		             })}), {
		              headers: {
		               "BBG-Key": "ab9ef204-3253-49d4-b229-3cc2383480a6",
		              }
		             })
		             .then(function (rep) {
		              if (rep.data.statusCode === '10001') {
		              	// var hosMonth = rep.data.data.busHosMonthDep.thisMonth.info
		              	that.optionsMenRightTop.xAxis[0].data = []
		              	
              			that.optionsMenRightTop.series[0].data = []
		              	that.optionsMenRightTop.series[1].data = []
		              	rep.data.data.busEmeMonthDep.thisMonth.monthTrend.xData.forEach((item) => {
		              		that.optionsMenRightTop.xAxis[0].data.push(item)
		              	})

		              	rep.data.data.busEmeMonthDep.thisMonth.monthTrend.yData.forEach((item) => {
		              		that.optionsMenRightTop.series[0].data.push(item)
		              	})
		              	console.log(that.optionsMenRightTop.series[0].data)
		              	rep.data.data.busEmeMonthDep.samePeriod.monthTrend.yData.forEach((item) => {
		              		that.optionsMenRightTop.series[1].data.push(item)
		              	})
		              	console.log(that.optionsMenRightTop.series[1].data)
		              	console.log(that.optionsMenRightTop)
		              	that.myChart1 = echarts.init(that.$refs.menrighttop)
						that.myChart1.setOption(that.optionsMenRightTop)

		              }
		             }).catch(function (error) {
		              // console.log(error);
		             })

			}
			if (that.type === '手术情况') {
					var depId = that.options_depIds[params.dataIndex] + ''
					axios.post('/service', qs.stringify({"data": JSON.stringify({
		              command: 'busSurMonthDepLinkage',
		              platform: 'web',
		              monthTime: that.month,
		              depId: depId,
		              type: that.typeValue
		             })}), {
		              headers: {
		               "BBG-Key": "ab9ef204-3253-49d4-b229-3cc2383480a6",
		              }
		             })
		             .then(function (rep) {
		             	if(rep.data.statusCode === '10001') {
		             		that.optionsshoushutop.xAxis[0].data = []
			              	that.optionsshoushutop.series[0].data = []
			              	that.optionsshoushutop.series[1].data = []
			              	rep.data.data.busSurMonthDep.thisMonth.monthTrend.xData.forEach((item) => {
			              		that.optionsshoushutop.xAxis[0].data.push(item)
			              	})
			              	rep.data.data.busSurMonthDep.thisMonth.monthTrend.yData.forEach((item) => {
			              		that.optionsshoushutop.series[0].data.push(item)
			              	})
			              	rep.data.data.busSurMonthDep.samePeriod.monthTrend.yData.forEach((item) => {
			              		that.optionsshoushutop.series[1].data.push(item)
			              	})
			              	that.myChart9 = echarts.init(that.$refs.shoushutop)
							that.myChart9.setOption(that.optionsshoushutop)

			              	
							var surThisMonth = rep.data.data.busSurMonthDep.thisMonth.info
							var surSamePeriod = rep.data.data.busSurMonthDep.samePeriod

					      //门诊手术类型图表
					      that.optionsMenzhenshoushuleixing.series[0].data[1].value = surThisMonth.hosANum //甲级住院
							that.optionsMenzhenshoushuleixing.series[0].data[2].value = surThisMonth.hosBNum //乙级住院
							that.optionsMenzhenshoushuleixing.series[0].data[3].value = surThisMonth.hosCNum //丙级住院
							that.optionsMenzhenshoushuleixing.series[0].data[4].value = surThisMonth.hosDNum //丁级住院
							that.optionsMenzhenshoushuleixing.series[0].data[5].value = surThisMonth.hosENum //戊级住院
							that.optionsMenzhenshoushuleixing.series[0].data[6].value = surThisMonth.hosFNum //乙庚住院
							that.optionsMenzhenshoushuleixing.series[0].data[7].value = surThisMonth.hosGNum//庚级门诊
							that.optionsMenzhenshoushuleixing.series[0].data[0].value = surThisMonth.hosSNum //特级住院
								that.myChart20 = echarts.init(that.$refs.menzhenshoushuleixing)
								that.myChart20.setOption(that.optionsMenzhenshoushuleixing)
		             	}

		             })
			}
			if (that.type === '药品使用情况') {
					var depId = that.options_depIds[params.dataIndex] + ''
					var medType = that.typeValue
					if(that.typeValue === 'medIncomeTotal') {
						medType = 'medSum'
					}
					// console.log(length - params.dataIndex -1)
					// console.log(testIndex)
					axios.post('/service', qs.stringify({"data": JSON.stringify({
		              command: 'busMedMonthDepLinkage',
		              platform: 'web',
		              monthTime: that.month,
		              type: medType,
		              depId: depId
		             })}), {
		              headers: {
		               "BBG-Key": "ab9ef204-3253-49d4-b229-3cc2383480a6",
		              }
		             })
		             .then(function (rep) {
		             	if(rep.data.statusCode === '10001') {
			            if(medType === 'medSum') {
		              		that.optionsMedicinetop.xAxis[0].data = []
			              	that.optionsMedicinetop.series[0].data = []
			              	that.optionsMedicinetop.series[1].data = []
			              	that.optionsMedicinetop.series[2].data = []
			              	that.optionsMedicinetop.series[3].data = []
			              	that.optionsMedicinetop.legend.data = [
				        	
				        	{
				        		icon: 'circle',
				        		name: '本月住院'
				        	},{
				        		icon: 'circle',
				        		name: '本月门急诊'
				        	},
				        	{
				        		icon: 'circle',
				        		name: '同期住院'
				        	},
				        	{
				        		icon: 'circle',
				        		name: '同期门急诊'
				        	},
				        	
				        	
				        ]

			              	rep.data.data.busMedMonthDep.thisMonth.monthTrend.xData.forEach((item) => {
			              		that.optionsMedicinetop.xAxis[0].data.push(item)
			              	})
			              	rep.data.data.busMedMonthDep.thisMonth.monthTrend.yMedHosNum.forEach((item) => {
			              		that.optionsMedicinetop.series[0].data.push(item)
			              	})
			              	rep.data.data.busMedMonthDep.thisMonth.monthTrend.yMedMemNum.forEach((item) => {
			              		that.optionsMedicinetop.series[1].data.push(item)
			              	})
			              	rep.data.data.busMedMonthDep.samePeriod.monthTrend.yMedMemNum.forEach((item) => {
			              		that.optionsMedicinetop.series[2].data.push(item)
			              	})
			              	rep.data.data.busMedMonthDep.samePeriod.monthTrend.yMedHosNum.forEach((item) => {
			              		that.optionsMedicinetop.series[3].data.push(item)
			              	})

			              	that.myChart6 = echarts.init(that.$refs.medicinetop)
							that.myChart6.setOption(that.optionsMedicinetop)
		              	} else if(medType === 'medHosNum') {
		              		that.optionsMedicinetop.xAxis[0].data = []
			              	that.optionsMedicinetop.series[0].data = []
			              	that.optionsMedicinetop.series[1].data = []
			              	that.optionsMedicinetop.series[2].data = []
			              	that.optionsMedicinetop.series[3].data = []
			              	that.optionsMedicinetop.legend.data = [
			              	{
				        		icon: 'circle',
				        		name: '本月住院'
				        	},
				        	{
				        		icon: 'circle',
				        		name: '同期住院'
				        	}]
			              	rep.data.data.busMedMonthDep.thisMonth.monthTrend.xData.forEach((item) => {
			              		that.optionsMedicinetop.xAxis[0].data.push(item)
			              	})
			              	rep.data.data.busMedMonthDep.thisMonth.monthTrend.yMedHosNum.forEach((item) => {
			              		that.optionsMedicinetop.series[0].data.push(item)
			              	})
			              	
			              	rep.data.data.busMedMonthDep.samePeriod.monthTrend.yMedHosNum.forEach((item) => {
			              		that.optionsMedicinetop.series[2].data.push(item)
			              	})
			              	that.myChart6 = echarts.init(that.$refs.medicinetop)
			              	that.myChart6.clear()
							that.myChart6.setOption(that.optionsMedicinetop)
		              	} else {
		              		that.optionsMedicinetop.xAxis[0].data = []
			              	that.optionsMedicinetop.series[0].data = []
			              	that.optionsMedicinetop.series[1].data = []
			              	that.optionsMedicinetop.series[2].data = []
			              	that.optionsMedicinetop.series[3].data = []
			              	that.optionsMedicinetop.legend.data = [
			              	{
				        		icon: 'circle',
				        		name: '本月门急诊'
				        	},
				        	{
				        		icon: 'circle',
				        		name: '同期门急诊'
				        	}]
			              	rep.data.data.busMedMonthDep.thisMonth.monthTrend.xData.forEach((item) => {
			              		that.optionsMedicinetop.xAxis[0].data.push(item)
			              	})
			              	rep.data.data.busMedMonthDep.thisMonth.monthTrend.yMedMemNum.forEach((item) => {
			              		that.optionsMedicinetop.series[1].data.push(item)
			              	})
			              	
			              	rep.data.data.busMedMonthDep.samePeriod.monthTrend.yMedMemNum.forEach((item) => {
			              		that.optionsMedicinetop.series[3].data.push(item)
			              	})
			              	that.myChart6 = echarts.init(that.$refs.medicinetop)
			              	that.myChart6.clear()
							that.myChart6.setOption(that.optionsMedicinetop)
		              	}
			    //           	that.myChart6 = echarts.init(that.$refs.medicinetop)
							// that.myChart6.setOption(that.optionsMedicinetop)
			              	//end

 								var surThisMonth = rep.data.data.busMedMonthDep.thisMonth.info
 								var surSamePeriod = rep.data.data.busMedMonthDep.samePeriod
					      that.medRate = surThisMonth.medRate //用药占比
					      // console.log(rep.data.data)
								that.monthTime = surThisMonth.monthTime //（评估时间）

								// //用药占比图表
								// that.optionsMenRightBottom.series[0].data[0].value = that.medRate
								that.optionsMenRightBottom.series[0].data[0].value = parseFloat(that.medRate).toFixed(2)
								that.myChart2 = echarts.init(that.$refs.menrightbottom)
								that.myChart2.setOption(that.optionsMenRightBottom)

								// //药品种占比
								that.medWestIncome = surThisMonth.medWestIncome //西药总额
								that.medDrinkIncome = surThisMonth.medDrinkIncome //中药饮片总额
								that.medMidIncome = surThisMonth.medMidIncome //中成药总额
								that.optionsyaopinzhong.series[0].data[0].value = that.medWestIncome
								that.optionsyaopinzhong.series[0].data[1].value = that.medMidIncome
								that.optionsyaopinzhong.series[0].data[2].value = that.medDrinkIncome
								that.myChart8 = echarts.init(that.$refs.yaopinzhong)
								that.myChart8.setOption(that.optionsyaopinzhong)
		             	}

		             }).catch(function (error) {
		              // console.log(error);
		             })
			}
			if (that.type === '耗材使用情况') {
					var depId = that.options_depIds[params.dataIndex] + ''

					// console.log(length - params.dataIndex -1)
					// console.log(testIndex)
					axios.post('/service', qs.stringify({"data": JSON.stringify({
		              command: 'busConMonthDepLinkage',
		              platform: 'web',
		              monthTime: that.month,
		              depId: depId,
		              type: that.typeValue
		             })}), {
		              headers: {
		               "BBG-Key": "ab9ef204-3253-49d4-b229-3cc2383480a6",
		              }
		             })
		             .then(function (rep) {
		             	if(rep.data.statusCode === '10001') {
		             		that.optionshaocaitop.xAxis[0].data = []
			              	that.optionshaocaitop.series[0].data = []
			              	that.optionshaocaitop.series[1].data = []
			              	rep.data.data.busConMonthDep.thisMonth.monthTrend.xData.forEach((item) => {
			              		that.optionshaocaitop.xAxis[0].data.push(item)
			              	})
			              	rep.data.data.busConMonthDep.thisMonth.monthTrend.yData.forEach((item) => {
			              		that.optionshaocaitop.series[0].data.push(item)
			              	})
			              	rep.data.data.busConMonthDep.samePeriod.monthTrend.yData.forEach((item) => {
			              		that.optionshaocaitop.series[1].data.push(item)
			              	})
			              	that.myChart13 = echarts.init(that.$refs.haocaitop)
							that.myChart13.setOption(that.optionshaocaitop)

			              	
 							var surThisMonth = rep.data.data.busConMonthDep.thisMonth.info

					   //    //耗材开销分类图表
					      that.conTimeNum = surThisMonth.conTimeNum //计费耗材总额
					      that.conNotimeNum = surThisMonth.conNotimeNum //非计费耗材总额

					      that.optionshaocaimenji.series[0].data[0].value = that.conTimeNum
					      that.optionshaocaimenji.series[0].data[1].value = that.conNotimeNum
					      that.myChart11 = echarts.init(that.$refs.haocaimenji)
								that.myChart11.setOption(that.optionshaocaimenji)

					   //    //耗材用途分类图表
					      that.conNurNum = surThisMonth.conNurNum //护理相关耗材总额
								that.conDocNum = surThisMonth.conDocNum //医生相关耗材总额
								that.optionshaocaileibie.series[0].data[0].value = that.conNurNum
								that.optionshaocaileibie.series[0].data[1].value = that.conDocNum
								that.myChart12 = echarts.init(that.$refs.haocaileibie)
								that.myChart12.setOption(that.optionshaocaileibie)
		             	}

		             }).catch(function (error) {
		              // console.log(error);
		             })
			}
			if (that.type === '扣罚情况') {
					var depId = that.options_depIds[params.dataIndex] + ''
					axios.post('/service', qs.stringify({"data": JSON.stringify({
		              command: 'busPenMonthDepLinkage',
		              platform: 'web',
		              monthTime: that.month,
		              depId: depId,
		              type: that.typeValue
		             })}), {
		              headers: {
		               "BBG-Key": "ab9ef204-3253-49d4-b229-3cc2383480a6",
		              }
		             })
		             .then(function (rep) {
		             	if(rep.data.statusCode === '10001') {
		             		that.optionsKoufazongequshi.xAxis[0].data = []
			              	that.optionsKoufazongequshi.series[0].data = []
			              	that.optionsKoufazongequshi.series[1].data = []
			              	rep.data.data.busPenMonthDep.thisMonth.monthTrend.xData.forEach((item) => {
			              		that.optionsKoufazongequshi.xAxis[0].data.push(item)
			              	})
			              	rep.data.data.busPenMonthDep.thisMonth.monthTrend.yData.forEach((item) => {
			              		that.optionsKoufazongequshi.series[0].data.push(item)
			              	})
			              	rep.data.data.busPenMonthDep.samePeriod.monthTrend.yData.forEach((item) => {
			              		that.optionsKoufazongequshi.series[1].data.push(item)
			              	})
			              	that.myChart91 = echarts.init(that.$refs.koufazongequshi)
											that.myChart91.setOption(that.optionsKoufazongequshi)

			              	
							var surThisMonth = rep.data.data.busPenMonthDep.thisMonth.info
							// that.otherPay = surThisMonth.otherPay //其他扣罚总额
							// that.penTotal = surThisMonth.penTotal //扣罚总额
							// that.refusePay = surThisMonth.refusePay //医保拒付扣罚总额
							// that.safePen = surThisMonth.safePen //医疗安全扣罚总额

				      		//图表
				      		that.refuseChePay = surThisMonth.refuseChePay //检查治疗费
							that.refuseMatPay = surThisMonth.refuseMatPay //材料费
							that.refuseMedPay = surThisMonth.refuseMedPay //药品费
							that.otherExpPay = surThisMonth.otherExpPay //专家诊迟诊费
							that.otherNormalPay = surThisMonth.otherNormalPay //普通诊迟诊费
							that.safeEmePay = surThisMonth.safeEmePay //扣科室绩效
							that.safeHosPay = surThisMonth.safeHosPay //扣个人绩效

							that.optionsAnquanbukoufa.series[0].data[0].value = that.safeEmePay
							that.optionsAnquanbukoufa.series[0].data[1].value = that.safeHosPay
							that.myChart111 = echarts.init(that.$refs.anquanbukoufa)
							that.myChart111.setOption(that.optionsAnquanbukoufa)

							that.optionsJufukoufa.series[0].data[0].value = that.refuseMedPay
							that.optionsJufukoufa.series[0].data[1].value = that.refuseMatPay
							that.optionsJufukoufa.series[0].data[2].value = that.refuseChePay
							that.myChart112 = echarts.init(that.$refs.jufukoufa)
							that.myChart112.setOption(that.optionsJufukoufa)

							that.optionsQitakoufa.series[0].data[0].value = that.otherExpPay
							that.optionsQitakoufa.series[0].data[1].value = that.otherNormalPay
							that.myChart113 = echarts.init(that.$refs.qitakoufa)
							that.myChart113.setOption(that.optionsQitakoufa)	
		             	}

		             }).catch(function (error) {
		              // console.log(error);
		             })
			}
	  })
	  

		

		// this.myChart3 = echarts.init(this.$refs.menrightbottomleft)
		// this.myChart3.setOption(this.optionsMenRightBottomleft)

		this.myChart4 = echarts.init(this.$refs.zhuchu)
		this.myChart4.setOption(this.optionsZhuchu)

		this.myChart5 = echarts.init(this.$refs.zhuzhen)
		this.myChart5.setOption(this.optionsZhuzhen)

		this.myChart6 = echarts.init(this.$refs.medicinetop)
		this.myChart6.setOption(this.optionsMedicinetop)

		// this.myChart7 = echarts.init(this.$refs.yaopinqushi)
		// this.myChart7.setOption(this.optionsyaopinqushi)

		this.myChart8 = echarts.init(this.$refs.yaopinzhong)
		this.myChart8.setOption(this.optionsyaopinzhong)

		this.myChart9 = echarts.init(this.$refs.shoushutop)
		this.myChart9.setOption(this.optionsshoushutop)

		// this.myChart10 = echarts.init(this.$refs.shoushubottom)
		// this.myChart10.setOption(this.optionsshoushubottom)

		this.myChart11 = echarts.init(this.$refs.haocaimenji)
		this.myChart11.setOption(this.optionshaocaimenji)

		this.myChart12 = echarts.init(this.$refs.haocaileibie)
		this.myChart12.setOption(this.optionshaocaileibie)

		this.myChart13 = echarts.init(this.$refs.haocaitop)
		this.myChart13.setOption(this.optionshaocaitop)
	},
	created () {
		this.heightClient = document.body.clientHeight - 170 + 'px'
		this.a = false
		this.a = true
		this.outHover = true
		// this.month = '2018-01'
		
		switch (this.type) {
				case '门急诊情况': 
					this.typeValue = 'medicalPeo'
					this.menBarTitle1 = '诊疗人次'
					this.menBarTitle2 = '门诊人次'
					this.menBarTitle3 = '急诊人次'
					this.firstUnit = '人次'
					this.secondUnit = '人次'
					this.thirdUnit = '人次'
					this.busEmeMonthHosMore()
					break;
				case '药品使用情况': 
					this.menBarTitle1 = '用药总额'
					this.menBarTitle3 = '门急诊用药总额'
					this.menBarTitle2 = '住院用药总额'
					this.firstUnit = '元'
					this.secondUnit = '元'
					this.thirdUnit = '元'
					this.typeValue = 'medIncomeTotal'
					this.busMedMonthHosMore()
					break;
				case '手术情况': 
					this.menBarTitle1 = '手术总数'
					this.menBarTitle2 = '住院手术'
					this.menBarTitle3 = '门诊手术'
					this.firstUnit = '台'
					this.secondUnit = '台'
					this.thirdUnit = '台'
					this.typeValue = 'surgeryNum'
					this.busSurMonthHosMore()
					break;
				case '住院情况': 
					this.menBarTitle1 = '出院人数'
					this.menBarTitle2 = '平均住院日'
					this.menBarTitle3 = '病床使用率'
					this.firstUnit = '人'
					this.secondUnit = '日'
					this.typeValue = 'outTotalPeo'
					this.busHosMonthHosMore()
					break;
				case '耗材使用情况': 
					this.menBarTitle1 = '耗材总额'
					this.menBarTitle2 = '住院耗材总额'
					this.menBarTitle3 = '门急诊耗材总额'
					this.typeValue = 'conTotal'
					this.busConMonthHosMore()
					break;
				case '扣罚情况': 
					this.typeValue = 'penTotal'
					this.busPenMonthHosMore()
					break;
			}

	},
	props: ['month'],
	watch: {
		month (newV, oldV) {
			// alert(newV)
			this.month = newV
			if (this.type === '门急诊情况') {
				this.busEmeMonthHosMore()
			} else if (this.type === '住院情况') {
				this.busHosMonthHosMore()
			} else if (this.type === '手术情况') {
				this.busSurMonthHosMore()
			} else if (this.type === '药品使用情况') {  
				this.busMedMonthHosMore()
			} else if (this.type === '耗材使用情况') {
				this.busConMonthHosMore()
			} else if (this.type === '扣罚情况'){
				this.busPenMonthHosMore()
			}
		}
	}
}
</script>
<style lang="scss" scoped>
	header{
		height: 63px;
		background: #fff;
		line-height: 63px;
		padding-left: 130px;
		font-size: 16px;
		font-family: '微软雅黑,PingFangSC';
		span {
			font-size: 16px;
			font-family: '微软雅黑,PingFangSC';
			color: #646464;
		}
		span:nth-child(1){
			color: #646464;
			margin-right: 40px;
			cursor: pointer;
			&:hover {
				color: #63A5Df;
			}
		}
		// a {
		// 	font-family: PingFangSC-Regular;
		// 	font-size: 16px;
		// 	color: #2086CB;
		// 	text-decoration: underline;
		// 	cursor: pointer;
		// }
	}
	.detail_container{
		// min-height: 850px;
		background: #f8f8f8;
		padding: 1.4%;
		font-family: '微软雅黑,PingFangSC';
		.side_choose{
			width: 39%;
			background: #fff;
			margin-right: 1%;
			height: 98%;
			float: left;
			box-shadow: 0 2px 8px 0 rgba(0,0,0,0.17);
			.choose_bar{
				height: 175px;
				padding-left: 2%;
				padding-right: 2%;
				width: 96%;
				.zhuyan-tittle {
					width: 100%;
					height: 40px;
					line-height: 40px;
					border-bottom: 1px solid #ddd;
					font-family: '微软雅黑,PingFangSC';
					font-size: 16px;
					color: #646464;
				}
				.active{
					background: #2086CB !important;
					color: #fff !important;
					box-shadow: 0 2px 12px 0 rgba(32,134,203,0.50);
					span{
						color: #fff !important;
					}

				}
				.active1{
					background: #65B345 !important;
					color: #fff !important;
					box-shadow: 0 2px 12px 0 rgba(101,179,69,0.50);
					span{
						color: #fff !important;
					}
				}
				.active2{
					background: #6893E7 !important;
					color: #fff !important;
					box-shadow: 0 2px 12px 0 rgba(113,121,229,0.50);
					span{
						color: #fff !important;
					}
				}
				.active3{
					background: #7179E5 !important;
					color: #fff !important;
					box-shadow: 0 2px 12px 0 rgba(73,182,185,0.50);
					span{
						color: #fff !important;
					}
				}
				.active4{
					background: #49B6B9 !important;
					color: #fff !important;
					box-shadow: 0 2px 12px 0 rgba(104,147,231,0.50);
					span{
						color: #fff !important;
					}
				}
				.active5{
					background: #88C43F !important;
					color: #fff !important;
					box-shadow: 0 2px 12px 0 rgba(164,213,105,0.42);
					.bar_font{
						color: #fff !important;
						font-size: 15px;
					}
					span{
						color: #fff !important;
					}
				}
				.bar,.bar_s{
					width: 28%;
					padding: 10px 2%;
					height: 67px;
					line-height: 20px;
					margin-top: 34px;
					border-radius: 5px;
					background: #f1f1f1;
					float: left;
					margin-right: 2%;
					cursor: pointer;
					font-size: 13px;
					font-family: '微软雅黑,PingFangSC';
					color: #787878;
					.bar-list{
						float: left;
						width: 40%;
						margin-right: 7%;
						margin-left: 3%;
						text-overflow: ellipsis;
						overflow: hidden;
						font-family: '微软雅黑,PingFangSC';
						span:nth-child(1){
							font-size: 15px;
							color: #4D4D4D;
							line-height: 28px;
						}
						
					}
					.bar-list:last-child{
						float: right;
					}
					.spe{
						span:nth-child(1){
							font-size: 18px;
							color: #4D4D4D;
							line-height: 28px;
						}	
					}
					span {
						font-family: '微软雅黑,PingFangSC';
					}
				}
				.bar_s{
					width: 19%;
					.bar_font{
						color: #4D4D4D;
						font-size: 15px;
						font-family: '微软雅黑,PingFangSC';
					}
				}
				.bar:last-child{
					margin-right: 0;
				}
			}
		}
		.container_right{
			float: left;
			width: 60%;
			height: 100%;
			font-family: '微软雅黑,PingFangSC';
			.koufa {
				width: 32%;
				float: left;
				background: #fff;
				height: calc(48% - 30px);
				box-shadow: 0 2px 8px 0 rgba(0,0,0,0.17);
				ul{
					display: flex;
					padding: 5px 0;
					text-align: center;
					li{
						width: 33%;
						border-right: 1px solid #ccc;
						span:first-child{
							font-size: 22px;
							line-height: 30px;
							color: #4D4D4D; 
						}
						span:last-child{
							font-size: 12px;
							color: #9B9B9B;
						}
					}
					li:last-child{
						border-right: 0px !important;
					}
				}
			}
			.koutwo{
				ul {
					li {
						width: 49.5% !important;
					}
				}
			}
			.right_title{
				height: 43px;
				line-height: 43px;
				padding-left: 22px;
				font-size: 17px;
				font-family: '微软雅黑,PingFangSC';
				color: #4D4D4D;
				border-bottom: 1px solid #ddd;
				.smtitle{
					font-size: 14px;
					color: #9B9B9B;
				}
			}
			.right_content{
				display: flex;
				width: 100%;
				align-items: center;
				justify-content: center;
				height: calc(100% - 45px);
				ul{
					width: 70%;
					height: 150px;
					align-items: center;
					justify-content: center;
					font-family: '微软雅黑,PingFangSC';
					li{
						height: 40px;
						line-height: 40px;
						margin-top: 10px;
						color: #787878;
						span{
							font-size: 24px;
							font-family: '微软雅黑,PingFangSC';
							color: #4D4D4D;
							display: inline-block;
						}
					}
				}
			}
			.right_top{
				height: 50%;
				background: #fff;
				margin-bottom: 30px;
				box-shadow: 0 2px 8px 0 rgba(0,0,0,0.17);
			}
			.right_bottom {
				height: calc(48% - 30px);
			}
		}
		.bottom-left, .bottom-right{
					width: 49%;
					background: #fff;
					height: 42%;
					float: left;
					margin-right: 4%;
					box-shadow: 0 2px 8px 0 rgba(0,0,0,0.17);
					.jizhendata{
						width: 92%;
						display: block;
						margin: 0 auto;
						height: 20%;
						margin-top: 10px;
						li{
							width: 33%;
							height: 100%;
							float: left;
							text-align: center;
							border-right: 1px solid #eee;
							font-size: 16px;
							color: #9B9B9B;
							span:nth-child(1) {
								font-size: 20px;
								color: #4D4D4D;
								line-height: 35px;
							}
						}
						li:last-child{
							border-right: none;
						}
					}
				}
				.bottom-right{
					margin-right: 0;
					.haocai{
						display: flex;
						padding: 10px 0 ;
						li{
							width: 49.5%;
							// height: 20%;
							text-align: center;
							border-right: 1px solid #ccc;
							span:first-child{
								font-size: 25px;
								color: #4D4D4D;
								line-height: 30px;
							}
							span:last-child{
								font-size: 16px;
								color: #9B9B9B;
							}
						}
						li:last-child{
							border-right: 0px;
						}
					}

					.right-small, .right-big{
						background: #fff;
					}
					.right-small{
						height: 50%;
						margin-bottom: 15px;
						.right_all{
							width: 100%;
							height: calc(100% - 43px);
							display: flex;
							align-items: center;
							font-family: '微软雅黑,PingFangSC';
							justify-content: center;
							ul {
								width: 90%;
								height: 60px;
								display: flex;
								align-items: center;
								justify-content: center;
								li{
									width: 33%;
									height: 100%;
									text-align: left;
									color:#4D4D4D;
									font-size: 22px;
									margin-top: 7px;
									margin-bottom: 7px;
									span {
										font-family: '微软雅黑,PingFangSC';
									}
									span:nth-child(3){
										color: #9B9B9B;
										font-size: 14px;
										padding-left: 5px;
										line-height: 25px;
									}
								}
								li:last-child{
									width: 32%;
								}
								li:first-child{
									margin-left: 2%;
									span:first-child{
										margin-right: 15%;
									}
								}
								li:nth-child(2){
									span:first-child{
										margin-right: 15%;
									}
								}
							}
						}
					}
					.right-big{
						height: 65%;
						box-shadow: 0 2px 8px 0 rgba(0,0,0,0.17);
						.bingchuang{
							width: 80%;
							display: block;
							margin: 0 auto;
							margin-top: 5%;

							li{
								height: 40px;
								color: #6A6A6A;
								font-size: 14px;
								width:48%;
								text-align: center;
								display: inline-block;
								span:nth-child(1){
									font-family: '微软雅黑,PingFangSC';
									display: inline-block;
									height: 60px;
									line-height: 60px;
									font-size: 24px;
									color: #4D4D4D;
								}
								span:last-child{
									display: inline-block;
									width: 160px;
									font-family: '微软雅黑,PingFangSC';
								}
							}
						}
					}
					.right_nav{
						height: 20%;
						width: 90%;
						margin: 0 auto;
						display: block;
						vertical-algin: middle;
						font-family: '微软雅黑,PingFangSC';
						li{
							float: left;
							width: 49%;
							height: 100%;
							text-align: center;
							font-family: '微软雅黑,PingFangSC';
							color:#4D4D4D;
							font-size: 24px;
							margin-top: 7px;
							margin-bottom: 7px;
							span {
								font-family: '微软雅黑,PingFangSC';
							}
							span:nth-child(3){
								color: #9B9B9B;
								font-size: 14px;
								font-family: '微软雅黑,PingFangSC';
								line-height: 25px;
							}
						}
						li:nth-child(odd){
							border-right: 1px solid #eee;
						}
					}
					.special{
						padding-top: 25px;
						li{
							width: 33%;
							font-size: 24px;
						}
					}
				}
				.right{
					margin-right: 2%;
					// margin-bottom: 20px;
				}
	}
</style>